/**
 * @file flip.c
 *
 * This module deals with flipping discs.
 *
 * A function is provided for each square of the board. These functions are
 * gathered into an array of functions, so that a fast access to each function
 * is allowed. The generic form of the function take as input the player and
 * the opponent bitboards and return the flipped squares into a bitboard.
 *
 * Given the following notation:
 *  - x = square where we play,
 *  - P = player's disc pattern,
 *  - O = opponent's disc pattern,
 * the basic principle is to read into an array the result of a move. Doing
 * this is easier for a single line ; so we can use arrays of the form:
 *  - ARRAY[x][8-bits disc pattern].
* The problem is thus to convert any line of a 64-bits disc pattern into an
 * 8-bits disc pattern. A fast way to do this is to select the right line,
 * with a bit-mask, to gather the masked-bits into a continuous set by a simple
 * multiplication and to right-shift the result to scale it into a number
 * between 0 and 255.
 * Once we get our 8-bits disc patterns,a first array (OUTFLANK) is used to
 * get the player's discs that surround the opponent discs:
 *  - outflank = OUTFLANK[x][O] & P
 * The result is then used as an index to access a second array giving the
 * flipped discs according to the surrounding player's discs:
 *  - flipped = FLIPPED[x][outflank].
 * Finally, a precomputed array transform the 8-bits disc pattern back into a
 * 64-bits disc pattern, and the flipped squares for each line are gathered and
 * returned to generate moves.
 *
 * @date 1998 - 2011
 * @author Richard Delorme
 * @version 4.1
 */

/** outflank array */
const unsigned char OUTFLANK[8][256] = {
	{
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
		0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x80, 0x80, 0x80, 0x80, 0x82, 0x82, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x41, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x21, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x44, 0x44, 0x42, 0x42, 0x41, 0x40,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x84, 0x84, 0x84, 0x84, 0x82, 0x82, 0x81, 0x80,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0x44, 0x44, 0x44, 0x42, 0x42, 0x41, 0x40,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
		0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x84, 0x84, 0x84, 0x84, 0x82, 0x82, 0x81, 0x80,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
		0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
		0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
		0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
		0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
};

/** flip array */
const unsigned char FLIPPED[8][256] = {
	{
		0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x08, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x18, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x38, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x78, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x10, 0x16, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x30, 0x36, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x70, 0x76, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x0e, 0x0c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x2e, 0x2c, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x60, 0x6e, 0x6c, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x1e, 0x1c, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x5e, 0x5c, 0x00, 0x58, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x3e, 0x3c, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
	{
		0x00, 0x7e, 0x7c, 0x00, 0x78, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	},
};

/** conversion from an 8-bit line to the A1-A8 line */
const unsigned long long A1A8[256] = {
		0x0000000000000000ULL, 0x0000000000000001ULL, 0x0000000000000100ULL, 0x0000000000000101ULL, 0x0000000000010000ULL, 0x0000000000010001ULL, 0x0000000000010100ULL, 0x0000000000010101ULL,
		0x0000000001000000ULL, 0x0000000001000001ULL, 0x0000000001000100ULL, 0x0000000001000101ULL, 0x0000000001010000ULL, 0x0000000001010001ULL, 0x0000000001010100ULL, 0x0000000001010101ULL,
		0x0000000100000000ULL, 0x0000000100000001ULL, 0x0000000100000100ULL, 0x0000000100000101ULL, 0x0000000100010000ULL, 0x0000000100010001ULL, 0x0000000100010100ULL, 0x0000000100010101ULL,
		0x0000000101000000ULL, 0x0000000101000001ULL, 0x0000000101000100ULL, 0x0000000101000101ULL, 0x0000000101010000ULL, 0x0000000101010001ULL, 0x0000000101010100ULL, 0x0000000101010101ULL,
		0x0000010000000000ULL, 0x0000010000000001ULL, 0x0000010000000100ULL, 0x0000010000000101ULL, 0x0000010000010000ULL, 0x0000010000010001ULL, 0x0000010000010100ULL, 0x0000010000010101ULL,
		0x0000010001000000ULL, 0x0000010001000001ULL, 0x0000010001000100ULL, 0x0000010001000101ULL, 0x0000010001010000ULL, 0x0000010001010001ULL, 0x0000010001010100ULL, 0x0000010001010101ULL,
		0x0000010100000000ULL, 0x0000010100000001ULL, 0x0000010100000100ULL, 0x0000010100000101ULL, 0x0000010100010000ULL, 0x0000010100010001ULL, 0x0000010100010100ULL, 0x0000010100010101ULL,
		0x0000010101000000ULL, 0x0000010101000001ULL, 0x0000010101000100ULL, 0x0000010101000101ULL, 0x0000010101010000ULL, 0x0000010101010001ULL, 0x0000010101010100ULL, 0x0000010101010101ULL,
		0x0001000000000000ULL, 0x0001000000000001ULL, 0x0001000000000100ULL, 0x0001000000000101ULL, 0x0001000000010000ULL, 0x0001000000010001ULL, 0x0001000000010100ULL, 0x0001000000010101ULL,
		0x0001000001000000ULL, 0x0001000001000001ULL, 0x0001000001000100ULL, 0x0001000001000101ULL, 0x0001000001010000ULL, 0x0001000001010001ULL, 0x0001000001010100ULL, 0x0001000001010101ULL,
		0x0001000100000000ULL, 0x0001000100000001ULL, 0x0001000100000100ULL, 0x0001000100000101ULL, 0x0001000100010000ULL, 0x0001000100010001ULL, 0x0001000100010100ULL, 0x0001000100010101ULL,
		0x0001000101000000ULL, 0x0001000101000001ULL, 0x0001000101000100ULL, 0x0001000101000101ULL, 0x0001000101010000ULL, 0x0001000101010001ULL, 0x0001000101010100ULL, 0x0001000101010101ULL,
		0x0001010000000000ULL, 0x0001010000000001ULL, 0x0001010000000100ULL, 0x0001010000000101ULL, 0x0001010000010000ULL, 0x0001010000010001ULL, 0x0001010000010100ULL, 0x0001010000010101ULL,
		0x0001010001000000ULL, 0x0001010001000001ULL, 0x0001010001000100ULL, 0x0001010001000101ULL, 0x0001010001010000ULL, 0x0001010001010001ULL, 0x0001010001010100ULL, 0x0001010001010101ULL,
		0x0001010100000000ULL, 0x0001010100000001ULL, 0x0001010100000100ULL, 0x0001010100000101ULL, 0x0001010100010000ULL, 0x0001010100010001ULL, 0x0001010100010100ULL, 0x0001010100010101ULL,
		0x0001010101000000ULL, 0x0001010101000001ULL, 0x0001010101000100ULL, 0x0001010101000101ULL, 0x0001010101010000ULL, 0x0001010101010001ULL, 0x0001010101010100ULL, 0x0001010101010101ULL,
		0x0100000000000000ULL, 0x0100000000000001ULL, 0x0100000000000100ULL, 0x0100000000000101ULL, 0x0100000000010000ULL, 0x0100000000010001ULL, 0x0100000000010100ULL, 0x0100000000010101ULL,
		0x0100000001000000ULL, 0x0100000001000001ULL, 0x0100000001000100ULL, 0x0100000001000101ULL, 0x0100000001010000ULL, 0x0100000001010001ULL, 0x0100000001010100ULL, 0x0100000001010101ULL,
		0x0100000100000000ULL, 0x0100000100000001ULL, 0x0100000100000100ULL, 0x0100000100000101ULL, 0x0100000100010000ULL, 0x0100000100010001ULL, 0x0100000100010100ULL, 0x0100000100010101ULL,
		0x0100000101000000ULL, 0x0100000101000001ULL, 0x0100000101000100ULL, 0x0100000101000101ULL, 0x0100000101010000ULL, 0x0100000101010001ULL, 0x0100000101010100ULL, 0x0100000101010101ULL,
		0x0100010000000000ULL, 0x0100010000000001ULL, 0x0100010000000100ULL, 0x0100010000000101ULL, 0x0100010000010000ULL, 0x0100010000010001ULL, 0x0100010000010100ULL, 0x0100010000010101ULL,
		0x0100010001000000ULL, 0x0100010001000001ULL, 0x0100010001000100ULL, 0x0100010001000101ULL, 0x0100010001010000ULL, 0x0100010001010001ULL, 0x0100010001010100ULL, 0x0100010001010101ULL,
		0x0100010100000000ULL, 0x0100010100000001ULL, 0x0100010100000100ULL, 0x0100010100000101ULL, 0x0100010100010000ULL, 0x0100010100010001ULL, 0x0100010100010100ULL, 0x0100010100010101ULL,
		0x0100010101000000ULL, 0x0100010101000001ULL, 0x0100010101000100ULL, 0x0100010101000101ULL, 0x0100010101010000ULL, 0x0100010101010001ULL, 0x0100010101010100ULL, 0x0100010101010101ULL,
		0x0101000000000000ULL, 0x0101000000000001ULL, 0x0101000000000100ULL, 0x0101000000000101ULL, 0x0101000000010000ULL, 0x0101000000010001ULL, 0x0101000000010100ULL, 0x0101000000010101ULL,
		0x0101000001000000ULL, 0x0101000001000001ULL, 0x0101000001000100ULL, 0x0101000001000101ULL, 0x0101000001010000ULL, 0x0101000001010001ULL, 0x0101000001010100ULL, 0x0101000001010101ULL,
		0x0101000100000000ULL, 0x0101000100000001ULL, 0x0101000100000100ULL, 0x0101000100000101ULL, 0x0101000100010000ULL, 0x0101000100010001ULL, 0x0101000100010100ULL, 0x0101000100010101ULL,
		0x0101000101000000ULL, 0x0101000101000001ULL, 0x0101000101000100ULL, 0x0101000101000101ULL, 0x0101000101010000ULL, 0x0101000101010001ULL, 0x0101000101010100ULL, 0x0101000101010101ULL,
		0x0101010000000000ULL, 0x0101010000000001ULL, 0x0101010000000100ULL, 0x0101010000000101ULL, 0x0101010000010000ULL, 0x0101010000010001ULL, 0x0101010000010100ULL, 0x0101010000010101ULL,
		0x0101010001000000ULL, 0x0101010001000001ULL, 0x0101010001000100ULL, 0x0101010001000101ULL, 0x0101010001010000ULL, 0x0101010001010001ULL, 0x0101010001010100ULL, 0x0101010001010101ULL,
		0x0101010100000000ULL, 0x0101010100000001ULL, 0x0101010100000100ULL, 0x0101010100000101ULL, 0x0101010100010000ULL, 0x0101010100010001ULL, 0x0101010100010100ULL, 0x0101010100010101ULL,
		0x0101010101000000ULL, 0x0101010101000001ULL, 0x0101010101000100ULL, 0x0101010101000101ULL, 0x0101010101010000ULL, 0x0101010101010001ULL, 0x0101010101010100ULL, 0x0101010101010101ULL,
};

/** conversion from an 8-bit line to the B1-B8 line */
const unsigned long long B1B8[256] = {
		0x0000000000000000ULL, 0x0000000000000002ULL, 0x0000000000000200ULL, 0x0000000000000202ULL, 0x0000000000020000ULL, 0x0000000000020002ULL, 0x0000000000020200ULL, 0x0000000000020202ULL,
		0x0000000002000000ULL, 0x0000000002000002ULL, 0x0000000002000200ULL, 0x0000000002000202ULL, 0x0000000002020000ULL, 0x0000000002020002ULL, 0x0000000002020200ULL, 0x0000000002020202ULL,
		0x0000000200000000ULL, 0x0000000200000002ULL, 0x0000000200000200ULL, 0x0000000200000202ULL, 0x0000000200020000ULL, 0x0000000200020002ULL, 0x0000000200020200ULL, 0x0000000200020202ULL,
		0x0000000202000000ULL, 0x0000000202000002ULL, 0x0000000202000200ULL, 0x0000000202000202ULL, 0x0000000202020000ULL, 0x0000000202020002ULL, 0x0000000202020200ULL, 0x0000000202020202ULL,
		0x0000020000000000ULL, 0x0000020000000002ULL, 0x0000020000000200ULL, 0x0000020000000202ULL, 0x0000020000020000ULL, 0x0000020000020002ULL, 0x0000020000020200ULL, 0x0000020000020202ULL,
		0x0000020002000000ULL, 0x0000020002000002ULL, 0x0000020002000200ULL, 0x0000020002000202ULL, 0x0000020002020000ULL, 0x0000020002020002ULL, 0x0000020002020200ULL, 0x0000020002020202ULL,
		0x0000020200000000ULL, 0x0000020200000002ULL, 0x0000020200000200ULL, 0x0000020200000202ULL, 0x0000020200020000ULL, 0x0000020200020002ULL, 0x0000020200020200ULL, 0x0000020200020202ULL,
		0x0000020202000000ULL, 0x0000020202000002ULL, 0x0000020202000200ULL, 0x0000020202000202ULL, 0x0000020202020000ULL, 0x0000020202020002ULL, 0x0000020202020200ULL, 0x0000020202020202ULL,
		0x0002000000000000ULL, 0x0002000000000002ULL, 0x0002000000000200ULL, 0x0002000000000202ULL, 0x0002000000020000ULL, 0x0002000000020002ULL, 0x0002000000020200ULL, 0x0002000000020202ULL,
		0x0002000002000000ULL, 0x0002000002000002ULL, 0x0002000002000200ULL, 0x0002000002000202ULL, 0x0002000002020000ULL, 0x0002000002020002ULL, 0x0002000002020200ULL, 0x0002000002020202ULL,
		0x0002000200000000ULL, 0x0002000200000002ULL, 0x0002000200000200ULL, 0x0002000200000202ULL, 0x0002000200020000ULL, 0x0002000200020002ULL, 0x0002000200020200ULL, 0x0002000200020202ULL,
		0x0002000202000000ULL, 0x0002000202000002ULL, 0x0002000202000200ULL, 0x0002000202000202ULL, 0x0002000202020000ULL, 0x0002000202020002ULL, 0x0002000202020200ULL, 0x0002000202020202ULL,
		0x0002020000000000ULL, 0x0002020000000002ULL, 0x0002020000000200ULL, 0x0002020000000202ULL, 0x0002020000020000ULL, 0x0002020000020002ULL, 0x0002020000020200ULL, 0x0002020000020202ULL,
		0x0002020002000000ULL, 0x0002020002000002ULL, 0x0002020002000200ULL, 0x0002020002000202ULL, 0x0002020002020000ULL, 0x0002020002020002ULL, 0x0002020002020200ULL, 0x0002020002020202ULL,
		0x0002020200000000ULL, 0x0002020200000002ULL, 0x0002020200000200ULL, 0x0002020200000202ULL, 0x0002020200020000ULL, 0x0002020200020002ULL, 0x0002020200020200ULL, 0x0002020200020202ULL,
		0x0002020202000000ULL, 0x0002020202000002ULL, 0x0002020202000200ULL, 0x0002020202000202ULL, 0x0002020202020000ULL, 0x0002020202020002ULL, 0x0002020202020200ULL, 0x0002020202020202ULL,
		0x0200000000000000ULL, 0x0200000000000002ULL, 0x0200000000000200ULL, 0x0200000000000202ULL, 0x0200000000020000ULL, 0x0200000000020002ULL, 0x0200000000020200ULL, 0x0200000000020202ULL,
		0x0200000002000000ULL, 0x0200000002000002ULL, 0x0200000002000200ULL, 0x0200000002000202ULL, 0x0200000002020000ULL, 0x0200000002020002ULL, 0x0200000002020200ULL, 0x0200000002020202ULL,
		0x0200000200000000ULL, 0x0200000200000002ULL, 0x0200000200000200ULL, 0x0200000200000202ULL, 0x0200000200020000ULL, 0x0200000200020002ULL, 0x0200000200020200ULL, 0x0200000200020202ULL,
		0x0200000202000000ULL, 0x0200000202000002ULL, 0x0200000202000200ULL, 0x0200000202000202ULL, 0x0200000202020000ULL, 0x0200000202020002ULL, 0x0200000202020200ULL, 0x0200000202020202ULL,
		0x0200020000000000ULL, 0x0200020000000002ULL, 0x0200020000000200ULL, 0x0200020000000202ULL, 0x0200020000020000ULL, 0x0200020000020002ULL, 0x0200020000020200ULL, 0x0200020000020202ULL,
		0x0200020002000000ULL, 0x0200020002000002ULL, 0x0200020002000200ULL, 0x0200020002000202ULL, 0x0200020002020000ULL, 0x0200020002020002ULL, 0x0200020002020200ULL, 0x0200020002020202ULL,
		0x0200020200000000ULL, 0x0200020200000002ULL, 0x0200020200000200ULL, 0x0200020200000202ULL, 0x0200020200020000ULL, 0x0200020200020002ULL, 0x0200020200020200ULL, 0x0200020200020202ULL,
		0x0200020202000000ULL, 0x0200020202000002ULL, 0x0200020202000200ULL, 0x0200020202000202ULL, 0x0200020202020000ULL, 0x0200020202020002ULL, 0x0200020202020200ULL, 0x0200020202020202ULL,
		0x0202000000000000ULL, 0x0202000000000002ULL, 0x0202000000000200ULL, 0x0202000000000202ULL, 0x0202000000020000ULL, 0x0202000000020002ULL, 0x0202000000020200ULL, 0x0202000000020202ULL,
		0x0202000002000000ULL, 0x0202000002000002ULL, 0x0202000002000200ULL, 0x0202000002000202ULL, 0x0202000002020000ULL, 0x0202000002020002ULL, 0x0202000002020200ULL, 0x0202000002020202ULL,
		0x0202000200000000ULL, 0x0202000200000002ULL, 0x0202000200000200ULL, 0x0202000200000202ULL, 0x0202000200020000ULL, 0x0202000200020002ULL, 0x0202000200020200ULL, 0x0202000200020202ULL,
		0x0202000202000000ULL, 0x0202000202000002ULL, 0x0202000202000200ULL, 0x0202000202000202ULL, 0x0202000202020000ULL, 0x0202000202020002ULL, 0x0202000202020200ULL, 0x0202000202020202ULL,
		0x0202020000000000ULL, 0x0202020000000002ULL, 0x0202020000000200ULL, 0x0202020000000202ULL, 0x0202020000020000ULL, 0x0202020000020002ULL, 0x0202020000020200ULL, 0x0202020000020202ULL,
		0x0202020002000000ULL, 0x0202020002000002ULL, 0x0202020002000200ULL, 0x0202020002000202ULL, 0x0202020002020000ULL, 0x0202020002020002ULL, 0x0202020002020200ULL, 0x0202020002020202ULL,
		0x0202020200000000ULL, 0x0202020200000002ULL, 0x0202020200000200ULL, 0x0202020200000202ULL, 0x0202020200020000ULL, 0x0202020200020002ULL, 0x0202020200020200ULL, 0x0202020200020202ULL,
		0x0202020202000000ULL, 0x0202020202000002ULL, 0x0202020202000200ULL, 0x0202020202000202ULL, 0x0202020202020000ULL, 0x0202020202020002ULL, 0x0202020202020200ULL, 0x0202020202020202ULL,
};

/** conversion from an 8-bit line to the C1-C8 line */
const unsigned long long C1C8[256] = {
		0x0000000000000000ULL, 0x0000000000000004ULL, 0x0000000000000400ULL, 0x0000000000000404ULL, 0x0000000000040000ULL, 0x0000000000040004ULL, 0x0000000000040400ULL, 0x0000000000040404ULL,
		0x0000000004000000ULL, 0x0000000004000004ULL, 0x0000000004000400ULL, 0x0000000004000404ULL, 0x0000000004040000ULL, 0x0000000004040004ULL, 0x0000000004040400ULL, 0x0000000004040404ULL,
		0x0000000400000000ULL, 0x0000000400000004ULL, 0x0000000400000400ULL, 0x0000000400000404ULL, 0x0000000400040000ULL, 0x0000000400040004ULL, 0x0000000400040400ULL, 0x0000000400040404ULL,
		0x0000000404000000ULL, 0x0000000404000004ULL, 0x0000000404000400ULL, 0x0000000404000404ULL, 0x0000000404040000ULL, 0x0000000404040004ULL, 0x0000000404040400ULL, 0x0000000404040404ULL,
		0x0000040000000000ULL, 0x0000040000000004ULL, 0x0000040000000400ULL, 0x0000040000000404ULL, 0x0000040000040000ULL, 0x0000040000040004ULL, 0x0000040000040400ULL, 0x0000040000040404ULL,
		0x0000040004000000ULL, 0x0000040004000004ULL, 0x0000040004000400ULL, 0x0000040004000404ULL, 0x0000040004040000ULL, 0x0000040004040004ULL, 0x0000040004040400ULL, 0x0000040004040404ULL,
		0x0000040400000000ULL, 0x0000040400000004ULL, 0x0000040400000400ULL, 0x0000040400000404ULL, 0x0000040400040000ULL, 0x0000040400040004ULL, 0x0000040400040400ULL, 0x0000040400040404ULL,
		0x0000040404000000ULL, 0x0000040404000004ULL, 0x0000040404000400ULL, 0x0000040404000404ULL, 0x0000040404040000ULL, 0x0000040404040004ULL, 0x0000040404040400ULL, 0x0000040404040404ULL,
		0x0004000000000000ULL, 0x0004000000000004ULL, 0x0004000000000400ULL, 0x0004000000000404ULL, 0x0004000000040000ULL, 0x0004000000040004ULL, 0x0004000000040400ULL, 0x0004000000040404ULL,
		0x0004000004000000ULL, 0x0004000004000004ULL, 0x0004000004000400ULL, 0x0004000004000404ULL, 0x0004000004040000ULL, 0x0004000004040004ULL, 0x0004000004040400ULL, 0x0004000004040404ULL,
		0x0004000400000000ULL, 0x0004000400000004ULL, 0x0004000400000400ULL, 0x0004000400000404ULL, 0x0004000400040000ULL, 0x0004000400040004ULL, 0x0004000400040400ULL, 0x0004000400040404ULL,
		0x0004000404000000ULL, 0x0004000404000004ULL, 0x0004000404000400ULL, 0x0004000404000404ULL, 0x0004000404040000ULL, 0x0004000404040004ULL, 0x0004000404040400ULL, 0x0004000404040404ULL,
		0x0004040000000000ULL, 0x0004040000000004ULL, 0x0004040000000400ULL, 0x0004040000000404ULL, 0x0004040000040000ULL, 0x0004040000040004ULL, 0x0004040000040400ULL, 0x0004040000040404ULL,
		0x0004040004000000ULL, 0x0004040004000004ULL, 0x0004040004000400ULL, 0x0004040004000404ULL, 0x0004040004040000ULL, 0x0004040004040004ULL, 0x0004040004040400ULL, 0x0004040004040404ULL,
		0x0004040400000000ULL, 0x0004040400000004ULL, 0x0004040400000400ULL, 0x0004040400000404ULL, 0x0004040400040000ULL, 0x0004040400040004ULL, 0x0004040400040400ULL, 0x0004040400040404ULL,
		0x0004040404000000ULL, 0x0004040404000004ULL, 0x0004040404000400ULL, 0x0004040404000404ULL, 0x0004040404040000ULL, 0x0004040404040004ULL, 0x0004040404040400ULL, 0x0004040404040404ULL,
		0x0400000000000000ULL, 0x0400000000000004ULL, 0x0400000000000400ULL, 0x0400000000000404ULL, 0x0400000000040000ULL, 0x0400000000040004ULL, 0x0400000000040400ULL, 0x0400000000040404ULL,
		0x0400000004000000ULL, 0x0400000004000004ULL, 0x0400000004000400ULL, 0x0400000004000404ULL, 0x0400000004040000ULL, 0x0400000004040004ULL, 0x0400000004040400ULL, 0x0400000004040404ULL,
		0x0400000400000000ULL, 0x0400000400000004ULL, 0x0400000400000400ULL, 0x0400000400000404ULL, 0x0400000400040000ULL, 0x0400000400040004ULL, 0x0400000400040400ULL, 0x0400000400040404ULL,
		0x0400000404000000ULL, 0x0400000404000004ULL, 0x0400000404000400ULL, 0x0400000404000404ULL, 0x0400000404040000ULL, 0x0400000404040004ULL, 0x0400000404040400ULL, 0x0400000404040404ULL,
		0x0400040000000000ULL, 0x0400040000000004ULL, 0x0400040000000400ULL, 0x0400040000000404ULL, 0x0400040000040000ULL, 0x0400040000040004ULL, 0x0400040000040400ULL, 0x0400040000040404ULL,
		0x0400040004000000ULL, 0x0400040004000004ULL, 0x0400040004000400ULL, 0x0400040004000404ULL, 0x0400040004040000ULL, 0x0400040004040004ULL, 0x0400040004040400ULL, 0x0400040004040404ULL,
		0x0400040400000000ULL, 0x0400040400000004ULL, 0x0400040400000400ULL, 0x0400040400000404ULL, 0x0400040400040000ULL, 0x0400040400040004ULL, 0x0400040400040400ULL, 0x0400040400040404ULL,
		0x0400040404000000ULL, 0x0400040404000004ULL, 0x0400040404000400ULL, 0x0400040404000404ULL, 0x0400040404040000ULL, 0x0400040404040004ULL, 0x0400040404040400ULL, 0x0400040404040404ULL,
		0x0404000000000000ULL, 0x0404000000000004ULL, 0x0404000000000400ULL, 0x0404000000000404ULL, 0x0404000000040000ULL, 0x0404000000040004ULL, 0x0404000000040400ULL, 0x0404000000040404ULL,
		0x0404000004000000ULL, 0x0404000004000004ULL, 0x0404000004000400ULL, 0x0404000004000404ULL, 0x0404000004040000ULL, 0x0404000004040004ULL, 0x0404000004040400ULL, 0x0404000004040404ULL,
		0x0404000400000000ULL, 0x0404000400000004ULL, 0x0404000400000400ULL, 0x0404000400000404ULL, 0x0404000400040000ULL, 0x0404000400040004ULL, 0x0404000400040400ULL, 0x0404000400040404ULL,
		0x0404000404000000ULL, 0x0404000404000004ULL, 0x0404000404000400ULL, 0x0404000404000404ULL, 0x0404000404040000ULL, 0x0404000404040004ULL, 0x0404000404040400ULL, 0x0404000404040404ULL,
		0x0404040000000000ULL, 0x0404040000000004ULL, 0x0404040000000400ULL, 0x0404040000000404ULL, 0x0404040000040000ULL, 0x0404040000040004ULL, 0x0404040000040400ULL, 0x0404040000040404ULL,
		0x0404040004000000ULL, 0x0404040004000004ULL, 0x0404040004000400ULL, 0x0404040004000404ULL, 0x0404040004040000ULL, 0x0404040004040004ULL, 0x0404040004040400ULL, 0x0404040004040404ULL,
		0x0404040400000000ULL, 0x0404040400000004ULL, 0x0404040400000400ULL, 0x0404040400000404ULL, 0x0404040400040000ULL, 0x0404040400040004ULL, 0x0404040400040400ULL, 0x0404040400040404ULL,
		0x0404040404000000ULL, 0x0404040404000004ULL, 0x0404040404000400ULL, 0x0404040404000404ULL, 0x0404040404040000ULL, 0x0404040404040004ULL, 0x0404040404040400ULL, 0x0404040404040404ULL,
};

/** conversion from an 8-bit line to the D1-D8 line */
const unsigned long long D1D8[256] = {
		0x0000000000000000ULL, 0x0000000000000008ULL, 0x0000000000000800ULL, 0x0000000000000808ULL, 0x0000000000080000ULL, 0x0000000000080008ULL, 0x0000000000080800ULL, 0x0000000000080808ULL,
		0x0000000008000000ULL, 0x0000000008000008ULL, 0x0000000008000800ULL, 0x0000000008000808ULL, 0x0000000008080000ULL, 0x0000000008080008ULL, 0x0000000008080800ULL, 0x0000000008080808ULL,
		0x0000000800000000ULL, 0x0000000800000008ULL, 0x0000000800000800ULL, 0x0000000800000808ULL, 0x0000000800080000ULL, 0x0000000800080008ULL, 0x0000000800080800ULL, 0x0000000800080808ULL,
		0x0000000808000000ULL, 0x0000000808000008ULL, 0x0000000808000800ULL, 0x0000000808000808ULL, 0x0000000808080000ULL, 0x0000000808080008ULL, 0x0000000808080800ULL, 0x0000000808080808ULL,
		0x0000080000000000ULL, 0x0000080000000008ULL, 0x0000080000000800ULL, 0x0000080000000808ULL, 0x0000080000080000ULL, 0x0000080000080008ULL, 0x0000080000080800ULL, 0x0000080000080808ULL,
		0x0000080008000000ULL, 0x0000080008000008ULL, 0x0000080008000800ULL, 0x0000080008000808ULL, 0x0000080008080000ULL, 0x0000080008080008ULL, 0x0000080008080800ULL, 0x0000080008080808ULL,
		0x0000080800000000ULL, 0x0000080800000008ULL, 0x0000080800000800ULL, 0x0000080800000808ULL, 0x0000080800080000ULL, 0x0000080800080008ULL, 0x0000080800080800ULL, 0x0000080800080808ULL,
		0x0000080808000000ULL, 0x0000080808000008ULL, 0x0000080808000800ULL, 0x0000080808000808ULL, 0x0000080808080000ULL, 0x0000080808080008ULL, 0x0000080808080800ULL, 0x0000080808080808ULL,
		0x0008000000000000ULL, 0x0008000000000008ULL, 0x0008000000000800ULL, 0x0008000000000808ULL, 0x0008000000080000ULL, 0x0008000000080008ULL, 0x0008000000080800ULL, 0x0008000000080808ULL,
		0x0008000008000000ULL, 0x0008000008000008ULL, 0x0008000008000800ULL, 0x0008000008000808ULL, 0x0008000008080000ULL, 0x0008000008080008ULL, 0x0008000008080800ULL, 0x0008000008080808ULL,
		0x0008000800000000ULL, 0x0008000800000008ULL, 0x0008000800000800ULL, 0x0008000800000808ULL, 0x0008000800080000ULL, 0x0008000800080008ULL, 0x0008000800080800ULL, 0x0008000800080808ULL,
		0x0008000808000000ULL, 0x0008000808000008ULL, 0x0008000808000800ULL, 0x0008000808000808ULL, 0x0008000808080000ULL, 0x0008000808080008ULL, 0x0008000808080800ULL, 0x0008000808080808ULL,
		0x0008080000000000ULL, 0x0008080000000008ULL, 0x0008080000000800ULL, 0x0008080000000808ULL, 0x0008080000080000ULL, 0x0008080000080008ULL, 0x0008080000080800ULL, 0x0008080000080808ULL,
		0x0008080008000000ULL, 0x0008080008000008ULL, 0x0008080008000800ULL, 0x0008080008000808ULL, 0x0008080008080000ULL, 0x0008080008080008ULL, 0x0008080008080800ULL, 0x0008080008080808ULL,
		0x0008080800000000ULL, 0x0008080800000008ULL, 0x0008080800000800ULL, 0x0008080800000808ULL, 0x0008080800080000ULL, 0x0008080800080008ULL, 0x0008080800080800ULL, 0x0008080800080808ULL,
		0x0008080808000000ULL, 0x0008080808000008ULL, 0x0008080808000800ULL, 0x0008080808000808ULL, 0x0008080808080000ULL, 0x0008080808080008ULL, 0x0008080808080800ULL, 0x0008080808080808ULL,
		0x0800000000000000ULL, 0x0800000000000008ULL, 0x0800000000000800ULL, 0x0800000000000808ULL, 0x0800000000080000ULL, 0x0800000000080008ULL, 0x0800000000080800ULL, 0x0800000000080808ULL,
		0x0800000008000000ULL, 0x0800000008000008ULL, 0x0800000008000800ULL, 0x0800000008000808ULL, 0x0800000008080000ULL, 0x0800000008080008ULL, 0x0800000008080800ULL, 0x0800000008080808ULL,
		0x0800000800000000ULL, 0x0800000800000008ULL, 0x0800000800000800ULL, 0x0800000800000808ULL, 0x0800000800080000ULL, 0x0800000800080008ULL, 0x0800000800080800ULL, 0x0800000800080808ULL,
		0x0800000808000000ULL, 0x0800000808000008ULL, 0x0800000808000800ULL, 0x0800000808000808ULL, 0x0800000808080000ULL, 0x0800000808080008ULL, 0x0800000808080800ULL, 0x0800000808080808ULL,
		0x0800080000000000ULL, 0x0800080000000008ULL, 0x0800080000000800ULL, 0x0800080000000808ULL, 0x0800080000080000ULL, 0x0800080000080008ULL, 0x0800080000080800ULL, 0x0800080000080808ULL,
		0x0800080008000000ULL, 0x0800080008000008ULL, 0x0800080008000800ULL, 0x0800080008000808ULL, 0x0800080008080000ULL, 0x0800080008080008ULL, 0x0800080008080800ULL, 0x0800080008080808ULL,
		0x0800080800000000ULL, 0x0800080800000008ULL, 0x0800080800000800ULL, 0x0800080800000808ULL, 0x0800080800080000ULL, 0x0800080800080008ULL, 0x0800080800080800ULL, 0x0800080800080808ULL,
		0x0800080808000000ULL, 0x0800080808000008ULL, 0x0800080808000800ULL, 0x0800080808000808ULL, 0x0800080808080000ULL, 0x0800080808080008ULL, 0x0800080808080800ULL, 0x0800080808080808ULL,
		0x0808000000000000ULL, 0x0808000000000008ULL, 0x0808000000000800ULL, 0x0808000000000808ULL, 0x0808000000080000ULL, 0x0808000000080008ULL, 0x0808000000080800ULL, 0x0808000000080808ULL,
		0x0808000008000000ULL, 0x0808000008000008ULL, 0x0808000008000800ULL, 0x0808000008000808ULL, 0x0808000008080000ULL, 0x0808000008080008ULL, 0x0808000008080800ULL, 0x0808000008080808ULL,
		0x0808000800000000ULL, 0x0808000800000008ULL, 0x0808000800000800ULL, 0x0808000800000808ULL, 0x0808000800080000ULL, 0x0808000800080008ULL, 0x0808000800080800ULL, 0x0808000800080808ULL,
		0x0808000808000000ULL, 0x0808000808000008ULL, 0x0808000808000800ULL, 0x0808000808000808ULL, 0x0808000808080000ULL, 0x0808000808080008ULL, 0x0808000808080800ULL, 0x0808000808080808ULL,
		0x0808080000000000ULL, 0x0808080000000008ULL, 0x0808080000000800ULL, 0x0808080000000808ULL, 0x0808080000080000ULL, 0x0808080000080008ULL, 0x0808080000080800ULL, 0x0808080000080808ULL,
		0x0808080008000000ULL, 0x0808080008000008ULL, 0x0808080008000800ULL, 0x0808080008000808ULL, 0x0808080008080000ULL, 0x0808080008080008ULL, 0x0808080008080800ULL, 0x0808080008080808ULL,
		0x0808080800000000ULL, 0x0808080800000008ULL, 0x0808080800000800ULL, 0x0808080800000808ULL, 0x0808080800080000ULL, 0x0808080800080008ULL, 0x0808080800080800ULL, 0x0808080800080808ULL,
		0x0808080808000000ULL, 0x0808080808000008ULL, 0x0808080808000800ULL, 0x0808080808000808ULL, 0x0808080808080000ULL, 0x0808080808080008ULL, 0x0808080808080800ULL, 0x0808080808080808ULL,
};

/** conversion from an 8-bit line to the E1-E8 line */
const unsigned long long E1E8[256] = {
		0x0000000000000000ULL, 0x0000000000000010ULL, 0x0000000000001000ULL, 0x0000000000001010ULL, 0x0000000000100000ULL, 0x0000000000100010ULL, 0x0000000000101000ULL, 0x0000000000101010ULL,
		0x0000000010000000ULL, 0x0000000010000010ULL, 0x0000000010001000ULL, 0x0000000010001010ULL, 0x0000000010100000ULL, 0x0000000010100010ULL, 0x0000000010101000ULL, 0x0000000010101010ULL,
		0x0000001000000000ULL, 0x0000001000000010ULL, 0x0000001000001000ULL, 0x0000001000001010ULL, 0x0000001000100000ULL, 0x0000001000100010ULL, 0x0000001000101000ULL, 0x0000001000101010ULL,
		0x0000001010000000ULL, 0x0000001010000010ULL, 0x0000001010001000ULL, 0x0000001010001010ULL, 0x0000001010100000ULL, 0x0000001010100010ULL, 0x0000001010101000ULL, 0x0000001010101010ULL,
		0x0000100000000000ULL, 0x0000100000000010ULL, 0x0000100000001000ULL, 0x0000100000001010ULL, 0x0000100000100000ULL, 0x0000100000100010ULL, 0x0000100000101000ULL, 0x0000100000101010ULL,
		0x0000100010000000ULL, 0x0000100010000010ULL, 0x0000100010001000ULL, 0x0000100010001010ULL, 0x0000100010100000ULL, 0x0000100010100010ULL, 0x0000100010101000ULL, 0x0000100010101010ULL,
		0x0000101000000000ULL, 0x0000101000000010ULL, 0x0000101000001000ULL, 0x0000101000001010ULL, 0x0000101000100000ULL, 0x0000101000100010ULL, 0x0000101000101000ULL, 0x0000101000101010ULL,
		0x0000101010000000ULL, 0x0000101010000010ULL, 0x0000101010001000ULL, 0x0000101010001010ULL, 0x0000101010100000ULL, 0x0000101010100010ULL, 0x0000101010101000ULL, 0x0000101010101010ULL,
		0x0010000000000000ULL, 0x0010000000000010ULL, 0x0010000000001000ULL, 0x0010000000001010ULL, 0x0010000000100000ULL, 0x0010000000100010ULL, 0x0010000000101000ULL, 0x0010000000101010ULL,
		0x0010000010000000ULL, 0x0010000010000010ULL, 0x0010000010001000ULL, 0x0010000010001010ULL, 0x0010000010100000ULL, 0x0010000010100010ULL, 0x0010000010101000ULL, 0x0010000010101010ULL,
		0x0010001000000000ULL, 0x0010001000000010ULL, 0x0010001000001000ULL, 0x0010001000001010ULL, 0x0010001000100000ULL, 0x0010001000100010ULL, 0x0010001000101000ULL, 0x0010001000101010ULL,
		0x0010001010000000ULL, 0x0010001010000010ULL, 0x0010001010001000ULL, 0x0010001010001010ULL, 0x0010001010100000ULL, 0x0010001010100010ULL, 0x0010001010101000ULL, 0x0010001010101010ULL,
		0x0010100000000000ULL, 0x0010100000000010ULL, 0x0010100000001000ULL, 0x0010100000001010ULL, 0x0010100000100000ULL, 0x0010100000100010ULL, 0x0010100000101000ULL, 0x0010100000101010ULL,
		0x0010100010000000ULL, 0x0010100010000010ULL, 0x0010100010001000ULL, 0x0010100010001010ULL, 0x0010100010100000ULL, 0x0010100010100010ULL, 0x0010100010101000ULL, 0x0010100010101010ULL,
		0x0010101000000000ULL, 0x0010101000000010ULL, 0x0010101000001000ULL, 0x0010101000001010ULL, 0x0010101000100000ULL, 0x0010101000100010ULL, 0x0010101000101000ULL, 0x0010101000101010ULL,
		0x0010101010000000ULL, 0x0010101010000010ULL, 0x0010101010001000ULL, 0x0010101010001010ULL, 0x0010101010100000ULL, 0x0010101010100010ULL, 0x0010101010101000ULL, 0x0010101010101010ULL,
		0x1000000000000000ULL, 0x1000000000000010ULL, 0x1000000000001000ULL, 0x1000000000001010ULL, 0x1000000000100000ULL, 0x1000000000100010ULL, 0x1000000000101000ULL, 0x1000000000101010ULL,
		0x1000000010000000ULL, 0x1000000010000010ULL, 0x1000000010001000ULL, 0x1000000010001010ULL, 0x1000000010100000ULL, 0x1000000010100010ULL, 0x1000000010101000ULL, 0x1000000010101010ULL,
		0x1000001000000000ULL, 0x1000001000000010ULL, 0x1000001000001000ULL, 0x1000001000001010ULL, 0x1000001000100000ULL, 0x1000001000100010ULL, 0x1000001000101000ULL, 0x1000001000101010ULL,
		0x1000001010000000ULL, 0x1000001010000010ULL, 0x1000001010001000ULL, 0x1000001010001010ULL, 0x1000001010100000ULL, 0x1000001010100010ULL, 0x1000001010101000ULL, 0x1000001010101010ULL,
		0x1000100000000000ULL, 0x1000100000000010ULL, 0x1000100000001000ULL, 0x1000100000001010ULL, 0x1000100000100000ULL, 0x1000100000100010ULL, 0x1000100000101000ULL, 0x1000100000101010ULL,
		0x1000100010000000ULL, 0x1000100010000010ULL, 0x1000100010001000ULL, 0x1000100010001010ULL, 0x1000100010100000ULL, 0x1000100010100010ULL, 0x1000100010101000ULL, 0x1000100010101010ULL,
		0x1000101000000000ULL, 0x1000101000000010ULL, 0x1000101000001000ULL, 0x1000101000001010ULL, 0x1000101000100000ULL, 0x1000101000100010ULL, 0x1000101000101000ULL, 0x1000101000101010ULL,
		0x1000101010000000ULL, 0x1000101010000010ULL, 0x1000101010001000ULL, 0x1000101010001010ULL, 0x1000101010100000ULL, 0x1000101010100010ULL, 0x1000101010101000ULL, 0x1000101010101010ULL,
		0x1010000000000000ULL, 0x1010000000000010ULL, 0x1010000000001000ULL, 0x1010000000001010ULL, 0x1010000000100000ULL, 0x1010000000100010ULL, 0x1010000000101000ULL, 0x1010000000101010ULL,
		0x1010000010000000ULL, 0x1010000010000010ULL, 0x1010000010001000ULL, 0x1010000010001010ULL, 0x1010000010100000ULL, 0x1010000010100010ULL, 0x1010000010101000ULL, 0x1010000010101010ULL,
		0x1010001000000000ULL, 0x1010001000000010ULL, 0x1010001000001000ULL, 0x1010001000001010ULL, 0x1010001000100000ULL, 0x1010001000100010ULL, 0x1010001000101000ULL, 0x1010001000101010ULL,
		0x1010001010000000ULL, 0x1010001010000010ULL, 0x1010001010001000ULL, 0x1010001010001010ULL, 0x1010001010100000ULL, 0x1010001010100010ULL, 0x1010001010101000ULL, 0x1010001010101010ULL,
		0x1010100000000000ULL, 0x1010100000000010ULL, 0x1010100000001000ULL, 0x1010100000001010ULL, 0x1010100000100000ULL, 0x1010100000100010ULL, 0x1010100000101000ULL, 0x1010100000101010ULL,
		0x1010100010000000ULL, 0x1010100010000010ULL, 0x1010100010001000ULL, 0x1010100010001010ULL, 0x1010100010100000ULL, 0x1010100010100010ULL, 0x1010100010101000ULL, 0x1010100010101010ULL,
		0x1010101000000000ULL, 0x1010101000000010ULL, 0x1010101000001000ULL, 0x1010101000001010ULL, 0x1010101000100000ULL, 0x1010101000100010ULL, 0x1010101000101000ULL, 0x1010101000101010ULL,
		0x1010101010000000ULL, 0x1010101010000010ULL, 0x1010101010001000ULL, 0x1010101010001010ULL, 0x1010101010100000ULL, 0x1010101010100010ULL, 0x1010101010101000ULL, 0x1010101010101010ULL,
};

/** conversion from an 8-bit line to the F1-F8 line */
const unsigned long long F1F8[256] = {
		0x0000000000000000ULL, 0x0000000000000020ULL, 0x0000000000002000ULL, 0x0000000000002020ULL, 0x0000000000200000ULL, 0x0000000000200020ULL, 0x0000000000202000ULL, 0x0000000000202020ULL,
		0x0000000020000000ULL, 0x0000000020000020ULL, 0x0000000020002000ULL, 0x0000000020002020ULL, 0x0000000020200000ULL, 0x0000000020200020ULL, 0x0000000020202000ULL, 0x0000000020202020ULL,
		0x0000002000000000ULL, 0x0000002000000020ULL, 0x0000002000002000ULL, 0x0000002000002020ULL, 0x0000002000200000ULL, 0x0000002000200020ULL, 0x0000002000202000ULL, 0x0000002000202020ULL,
		0x0000002020000000ULL, 0x0000002020000020ULL, 0x0000002020002000ULL, 0x0000002020002020ULL, 0x0000002020200000ULL, 0x0000002020200020ULL, 0x0000002020202000ULL, 0x0000002020202020ULL,
		0x0000200000000000ULL, 0x0000200000000020ULL, 0x0000200000002000ULL, 0x0000200000002020ULL, 0x0000200000200000ULL, 0x0000200000200020ULL, 0x0000200000202000ULL, 0x0000200000202020ULL,
		0x0000200020000000ULL, 0x0000200020000020ULL, 0x0000200020002000ULL, 0x0000200020002020ULL, 0x0000200020200000ULL, 0x0000200020200020ULL, 0x0000200020202000ULL, 0x0000200020202020ULL,
		0x0000202000000000ULL, 0x0000202000000020ULL, 0x0000202000002000ULL, 0x0000202000002020ULL, 0x0000202000200000ULL, 0x0000202000200020ULL, 0x0000202000202000ULL, 0x0000202000202020ULL,
		0x0000202020000000ULL, 0x0000202020000020ULL, 0x0000202020002000ULL, 0x0000202020002020ULL, 0x0000202020200000ULL, 0x0000202020200020ULL, 0x0000202020202000ULL, 0x0000202020202020ULL,
		0x0020000000000000ULL, 0x0020000000000020ULL, 0x0020000000002000ULL, 0x0020000000002020ULL, 0x0020000000200000ULL, 0x0020000000200020ULL, 0x0020000000202000ULL, 0x0020000000202020ULL,
		0x0020000020000000ULL, 0x0020000020000020ULL, 0x0020000020002000ULL, 0x0020000020002020ULL, 0x0020000020200000ULL, 0x0020000020200020ULL, 0x0020000020202000ULL, 0x0020000020202020ULL,
		0x0020002000000000ULL, 0x0020002000000020ULL, 0x0020002000002000ULL, 0x0020002000002020ULL, 0x0020002000200000ULL, 0x0020002000200020ULL, 0x0020002000202000ULL, 0x0020002000202020ULL,
		0x0020002020000000ULL, 0x0020002020000020ULL, 0x0020002020002000ULL, 0x0020002020002020ULL, 0x0020002020200000ULL, 0x0020002020200020ULL, 0x0020002020202000ULL, 0x0020002020202020ULL,
		0x0020200000000000ULL, 0x0020200000000020ULL, 0x0020200000002000ULL, 0x0020200000002020ULL, 0x0020200000200000ULL, 0x0020200000200020ULL, 0x0020200000202000ULL, 0x0020200000202020ULL,
		0x0020200020000000ULL, 0x0020200020000020ULL, 0x0020200020002000ULL, 0x0020200020002020ULL, 0x0020200020200000ULL, 0x0020200020200020ULL, 0x0020200020202000ULL, 0x0020200020202020ULL,
		0x0020202000000000ULL, 0x0020202000000020ULL, 0x0020202000002000ULL, 0x0020202000002020ULL, 0x0020202000200000ULL, 0x0020202000200020ULL, 0x0020202000202000ULL, 0x0020202000202020ULL,
		0x0020202020000000ULL, 0x0020202020000020ULL, 0x0020202020002000ULL, 0x0020202020002020ULL, 0x0020202020200000ULL, 0x0020202020200020ULL, 0x0020202020202000ULL, 0x0020202020202020ULL,
		0x2000000000000000ULL, 0x2000000000000020ULL, 0x2000000000002000ULL, 0x2000000000002020ULL, 0x2000000000200000ULL, 0x2000000000200020ULL, 0x2000000000202000ULL, 0x2000000000202020ULL,
		0x2000000020000000ULL, 0x2000000020000020ULL, 0x2000000020002000ULL, 0x2000000020002020ULL, 0x2000000020200000ULL, 0x2000000020200020ULL, 0x2000000020202000ULL, 0x2000000020202020ULL,
		0x2000002000000000ULL, 0x2000002000000020ULL, 0x2000002000002000ULL, 0x2000002000002020ULL, 0x2000002000200000ULL, 0x2000002000200020ULL, 0x2000002000202000ULL, 0x2000002000202020ULL,
		0x2000002020000000ULL, 0x2000002020000020ULL, 0x2000002020002000ULL, 0x2000002020002020ULL, 0x2000002020200000ULL, 0x2000002020200020ULL, 0x2000002020202000ULL, 0x2000002020202020ULL,
		0x2000200000000000ULL, 0x2000200000000020ULL, 0x2000200000002000ULL, 0x2000200000002020ULL, 0x2000200000200000ULL, 0x2000200000200020ULL, 0x2000200000202000ULL, 0x2000200000202020ULL,
		0x2000200020000000ULL, 0x2000200020000020ULL, 0x2000200020002000ULL, 0x2000200020002020ULL, 0x2000200020200000ULL, 0x2000200020200020ULL, 0x2000200020202000ULL, 0x2000200020202020ULL,
		0x2000202000000000ULL, 0x2000202000000020ULL, 0x2000202000002000ULL, 0x2000202000002020ULL, 0x2000202000200000ULL, 0x2000202000200020ULL, 0x2000202000202000ULL, 0x2000202000202020ULL,
		0x2000202020000000ULL, 0x2000202020000020ULL, 0x2000202020002000ULL, 0x2000202020002020ULL, 0x2000202020200000ULL, 0x2000202020200020ULL, 0x2000202020202000ULL, 0x2000202020202020ULL,
		0x2020000000000000ULL, 0x2020000000000020ULL, 0x2020000000002000ULL, 0x2020000000002020ULL, 0x2020000000200000ULL, 0x2020000000200020ULL, 0x2020000000202000ULL, 0x2020000000202020ULL,
		0x2020000020000000ULL, 0x2020000020000020ULL, 0x2020000020002000ULL, 0x2020000020002020ULL, 0x2020000020200000ULL, 0x2020000020200020ULL, 0x2020000020202000ULL, 0x2020000020202020ULL,
		0x2020002000000000ULL, 0x2020002000000020ULL, 0x2020002000002000ULL, 0x2020002000002020ULL, 0x2020002000200000ULL, 0x2020002000200020ULL, 0x2020002000202000ULL, 0x2020002000202020ULL,
		0x2020002020000000ULL, 0x2020002020000020ULL, 0x2020002020002000ULL, 0x2020002020002020ULL, 0x2020002020200000ULL, 0x2020002020200020ULL, 0x2020002020202000ULL, 0x2020002020202020ULL,
		0x2020200000000000ULL, 0x2020200000000020ULL, 0x2020200000002000ULL, 0x2020200000002020ULL, 0x2020200000200000ULL, 0x2020200000200020ULL, 0x2020200000202000ULL, 0x2020200000202020ULL,
		0x2020200020000000ULL, 0x2020200020000020ULL, 0x2020200020002000ULL, 0x2020200020002020ULL, 0x2020200020200000ULL, 0x2020200020200020ULL, 0x2020200020202000ULL, 0x2020200020202020ULL,
		0x2020202000000000ULL, 0x2020202000000020ULL, 0x2020202000002000ULL, 0x2020202000002020ULL, 0x2020202000200000ULL, 0x2020202000200020ULL, 0x2020202000202000ULL, 0x2020202000202020ULL,
		0x2020202020000000ULL, 0x2020202020000020ULL, 0x2020202020002000ULL, 0x2020202020002020ULL, 0x2020202020200000ULL, 0x2020202020200020ULL, 0x2020202020202000ULL, 0x2020202020202020ULL,
};

/** conversion from an 8-bit line to the G1-G8 line */
const unsigned long long G1G8[256] = {
		0x0000000000000000ULL, 0x0000000000000040ULL, 0x0000000000004000ULL, 0x0000000000004040ULL, 0x0000000000400000ULL, 0x0000000000400040ULL, 0x0000000000404000ULL, 0x0000000000404040ULL,
		0x0000000040000000ULL, 0x0000000040000040ULL, 0x0000000040004000ULL, 0x0000000040004040ULL, 0x0000000040400000ULL, 0x0000000040400040ULL, 0x0000000040404000ULL, 0x0000000040404040ULL,
		0x0000004000000000ULL, 0x0000004000000040ULL, 0x0000004000004000ULL, 0x0000004000004040ULL, 0x0000004000400000ULL, 0x0000004000400040ULL, 0x0000004000404000ULL, 0x0000004000404040ULL,
		0x0000004040000000ULL, 0x0000004040000040ULL, 0x0000004040004000ULL, 0x0000004040004040ULL, 0x0000004040400000ULL, 0x0000004040400040ULL, 0x0000004040404000ULL, 0x0000004040404040ULL,
		0x0000400000000000ULL, 0x0000400000000040ULL, 0x0000400000004000ULL, 0x0000400000004040ULL, 0x0000400000400000ULL, 0x0000400000400040ULL, 0x0000400000404000ULL, 0x0000400000404040ULL,
		0x0000400040000000ULL, 0x0000400040000040ULL, 0x0000400040004000ULL, 0x0000400040004040ULL, 0x0000400040400000ULL, 0x0000400040400040ULL, 0x0000400040404000ULL, 0x0000400040404040ULL,
		0x0000404000000000ULL, 0x0000404000000040ULL, 0x0000404000004000ULL, 0x0000404000004040ULL, 0x0000404000400000ULL, 0x0000404000400040ULL, 0x0000404000404000ULL, 0x0000404000404040ULL,
		0x0000404040000000ULL, 0x0000404040000040ULL, 0x0000404040004000ULL, 0x0000404040004040ULL, 0x0000404040400000ULL, 0x0000404040400040ULL, 0x0000404040404000ULL, 0x0000404040404040ULL,
		0x0040000000000000ULL, 0x0040000000000040ULL, 0x0040000000004000ULL, 0x0040000000004040ULL, 0x0040000000400000ULL, 0x0040000000400040ULL, 0x0040000000404000ULL, 0x0040000000404040ULL,
		0x0040000040000000ULL, 0x0040000040000040ULL, 0x0040000040004000ULL, 0x0040000040004040ULL, 0x0040000040400000ULL, 0x0040000040400040ULL, 0x0040000040404000ULL, 0x0040000040404040ULL,
		0x0040004000000000ULL, 0x0040004000000040ULL, 0x0040004000004000ULL, 0x0040004000004040ULL, 0x0040004000400000ULL, 0x0040004000400040ULL, 0x0040004000404000ULL, 0x0040004000404040ULL,
		0x0040004040000000ULL, 0x0040004040000040ULL, 0x0040004040004000ULL, 0x0040004040004040ULL, 0x0040004040400000ULL, 0x0040004040400040ULL, 0x0040004040404000ULL, 0x0040004040404040ULL,
		0x0040400000000000ULL, 0x0040400000000040ULL, 0x0040400000004000ULL, 0x0040400000004040ULL, 0x0040400000400000ULL, 0x0040400000400040ULL, 0x0040400000404000ULL, 0x0040400000404040ULL,
		0x0040400040000000ULL, 0x0040400040000040ULL, 0x0040400040004000ULL, 0x0040400040004040ULL, 0x0040400040400000ULL, 0x0040400040400040ULL, 0x0040400040404000ULL, 0x0040400040404040ULL,
		0x0040404000000000ULL, 0x0040404000000040ULL, 0x0040404000004000ULL, 0x0040404000004040ULL, 0x0040404000400000ULL, 0x0040404000400040ULL, 0x0040404000404000ULL, 0x0040404000404040ULL,
		0x0040404040000000ULL, 0x0040404040000040ULL, 0x0040404040004000ULL, 0x0040404040004040ULL, 0x0040404040400000ULL, 0x0040404040400040ULL, 0x0040404040404000ULL, 0x0040404040404040ULL,
		0x4000000000000000ULL, 0x4000000000000040ULL, 0x4000000000004000ULL, 0x4000000000004040ULL, 0x4000000000400000ULL, 0x4000000000400040ULL, 0x4000000000404000ULL, 0x4000000000404040ULL,
		0x4000000040000000ULL, 0x4000000040000040ULL, 0x4000000040004000ULL, 0x4000000040004040ULL, 0x4000000040400000ULL, 0x4000000040400040ULL, 0x4000000040404000ULL, 0x4000000040404040ULL,
		0x4000004000000000ULL, 0x4000004000000040ULL, 0x4000004000004000ULL, 0x4000004000004040ULL, 0x4000004000400000ULL, 0x4000004000400040ULL, 0x4000004000404000ULL, 0x4000004000404040ULL,
		0x4000004040000000ULL, 0x4000004040000040ULL, 0x4000004040004000ULL, 0x4000004040004040ULL, 0x4000004040400000ULL, 0x4000004040400040ULL, 0x4000004040404000ULL, 0x4000004040404040ULL,
		0x4000400000000000ULL, 0x4000400000000040ULL, 0x4000400000004000ULL, 0x4000400000004040ULL, 0x4000400000400000ULL, 0x4000400000400040ULL, 0x4000400000404000ULL, 0x4000400000404040ULL,
		0x4000400040000000ULL, 0x4000400040000040ULL, 0x4000400040004000ULL, 0x4000400040004040ULL, 0x4000400040400000ULL, 0x4000400040400040ULL, 0x4000400040404000ULL, 0x4000400040404040ULL,
		0x4000404000000000ULL, 0x4000404000000040ULL, 0x4000404000004000ULL, 0x4000404000004040ULL, 0x4000404000400000ULL, 0x4000404000400040ULL, 0x4000404000404000ULL, 0x4000404000404040ULL,
		0x4000404040000000ULL, 0x4000404040000040ULL, 0x4000404040004000ULL, 0x4000404040004040ULL, 0x4000404040400000ULL, 0x4000404040400040ULL, 0x4000404040404000ULL, 0x4000404040404040ULL,
		0x4040000000000000ULL, 0x4040000000000040ULL, 0x4040000000004000ULL, 0x4040000000004040ULL, 0x4040000000400000ULL, 0x4040000000400040ULL, 0x4040000000404000ULL, 0x4040000000404040ULL,
		0x4040000040000000ULL, 0x4040000040000040ULL, 0x4040000040004000ULL, 0x4040000040004040ULL, 0x4040000040400000ULL, 0x4040000040400040ULL, 0x4040000040404000ULL, 0x4040000040404040ULL,
		0x4040004000000000ULL, 0x4040004000000040ULL, 0x4040004000004000ULL, 0x4040004000004040ULL, 0x4040004000400000ULL, 0x4040004000400040ULL, 0x4040004000404000ULL, 0x4040004000404040ULL,
		0x4040004040000000ULL, 0x4040004040000040ULL, 0x4040004040004000ULL, 0x4040004040004040ULL, 0x4040004040400000ULL, 0x4040004040400040ULL, 0x4040004040404000ULL, 0x4040004040404040ULL,
		0x4040400000000000ULL, 0x4040400000000040ULL, 0x4040400000004000ULL, 0x4040400000004040ULL, 0x4040400000400000ULL, 0x4040400000400040ULL, 0x4040400000404000ULL, 0x4040400000404040ULL,
		0x4040400040000000ULL, 0x4040400040000040ULL, 0x4040400040004000ULL, 0x4040400040004040ULL, 0x4040400040400000ULL, 0x4040400040400040ULL, 0x4040400040404000ULL, 0x4040400040404040ULL,
		0x4040404000000000ULL, 0x4040404000000040ULL, 0x4040404000004000ULL, 0x4040404000004040ULL, 0x4040404000400000ULL, 0x4040404000400040ULL, 0x4040404000404000ULL, 0x4040404000404040ULL,
		0x4040404040000000ULL, 0x4040404040000040ULL, 0x4040404040004000ULL, 0x4040404040004040ULL, 0x4040404040400000ULL, 0x4040404040400040ULL, 0x4040404040404000ULL, 0x4040404040404040ULL,
};

/** conversion from an 8-bit line to the H1-H8 line */
const unsigned long long H1H8[256] = {
		0x0000000000000000ULL, 0x0000000000000080ULL, 0x0000000000008000ULL, 0x0000000000008080ULL, 0x0000000000800000ULL, 0x0000000000800080ULL, 0x0000000000808000ULL, 0x0000000000808080ULL,
		0x0000000080000000ULL, 0x0000000080000080ULL, 0x0000000080008000ULL, 0x0000000080008080ULL, 0x0000000080800000ULL, 0x0000000080800080ULL, 0x0000000080808000ULL, 0x0000000080808080ULL,
		0x0000008000000000ULL, 0x0000008000000080ULL, 0x0000008000008000ULL, 0x0000008000008080ULL, 0x0000008000800000ULL, 0x0000008000800080ULL, 0x0000008000808000ULL, 0x0000008000808080ULL,
		0x0000008080000000ULL, 0x0000008080000080ULL, 0x0000008080008000ULL, 0x0000008080008080ULL, 0x0000008080800000ULL, 0x0000008080800080ULL, 0x0000008080808000ULL, 0x0000008080808080ULL,
		0x0000800000000000ULL, 0x0000800000000080ULL, 0x0000800000008000ULL, 0x0000800000008080ULL, 0x0000800000800000ULL, 0x0000800000800080ULL, 0x0000800000808000ULL, 0x0000800000808080ULL,
		0x0000800080000000ULL, 0x0000800080000080ULL, 0x0000800080008000ULL, 0x0000800080008080ULL, 0x0000800080800000ULL, 0x0000800080800080ULL, 0x0000800080808000ULL, 0x0000800080808080ULL,
		0x0000808000000000ULL, 0x0000808000000080ULL, 0x0000808000008000ULL, 0x0000808000008080ULL, 0x0000808000800000ULL, 0x0000808000800080ULL, 0x0000808000808000ULL, 0x0000808000808080ULL,
		0x0000808080000000ULL, 0x0000808080000080ULL, 0x0000808080008000ULL, 0x0000808080008080ULL, 0x0000808080800000ULL, 0x0000808080800080ULL, 0x0000808080808000ULL, 0x0000808080808080ULL,
		0x0080000000000000ULL, 0x0080000000000080ULL, 0x0080000000008000ULL, 0x0080000000008080ULL, 0x0080000000800000ULL, 0x0080000000800080ULL, 0x0080000000808000ULL, 0x0080000000808080ULL,
		0x0080000080000000ULL, 0x0080000080000080ULL, 0x0080000080008000ULL, 0x0080000080008080ULL, 0x0080000080800000ULL, 0x0080000080800080ULL, 0x0080000080808000ULL, 0x0080000080808080ULL,
		0x0080008000000000ULL, 0x0080008000000080ULL, 0x0080008000008000ULL, 0x0080008000008080ULL, 0x0080008000800000ULL, 0x0080008000800080ULL, 0x0080008000808000ULL, 0x0080008000808080ULL,
		0x0080008080000000ULL, 0x0080008080000080ULL, 0x0080008080008000ULL, 0x0080008080008080ULL, 0x0080008080800000ULL, 0x0080008080800080ULL, 0x0080008080808000ULL, 0x0080008080808080ULL,
		0x0080800000000000ULL, 0x0080800000000080ULL, 0x0080800000008000ULL, 0x0080800000008080ULL, 0x0080800000800000ULL, 0x0080800000800080ULL, 0x0080800000808000ULL, 0x0080800000808080ULL,
		0x0080800080000000ULL, 0x0080800080000080ULL, 0x0080800080008000ULL, 0x0080800080008080ULL, 0x0080800080800000ULL, 0x0080800080800080ULL, 0x0080800080808000ULL, 0x0080800080808080ULL,
		0x0080808000000000ULL, 0x0080808000000080ULL, 0x0080808000008000ULL, 0x0080808000008080ULL, 0x0080808000800000ULL, 0x0080808000800080ULL, 0x0080808000808000ULL, 0x0080808000808080ULL,
		0x0080808080000000ULL, 0x0080808080000080ULL, 0x0080808080008000ULL, 0x0080808080008080ULL, 0x0080808080800000ULL, 0x0080808080800080ULL, 0x0080808080808000ULL, 0x0080808080808080ULL,
		0x8000000000000000ULL, 0x8000000000000080ULL, 0x8000000000008000ULL, 0x8000000000008080ULL, 0x8000000000800000ULL, 0x8000000000800080ULL, 0x8000000000808000ULL, 0x8000000000808080ULL,
		0x8000000080000000ULL, 0x8000000080000080ULL, 0x8000000080008000ULL, 0x8000000080008080ULL, 0x8000000080800000ULL, 0x8000000080800080ULL, 0x8000000080808000ULL, 0x8000000080808080ULL,
		0x8000008000000000ULL, 0x8000008000000080ULL, 0x8000008000008000ULL, 0x8000008000008080ULL, 0x8000008000800000ULL, 0x8000008000800080ULL, 0x8000008000808000ULL, 0x8000008000808080ULL,
		0x8000008080000000ULL, 0x8000008080000080ULL, 0x8000008080008000ULL, 0x8000008080008080ULL, 0x8000008080800000ULL, 0x8000008080800080ULL, 0x8000008080808000ULL, 0x8000008080808080ULL,
		0x8000800000000000ULL, 0x8000800000000080ULL, 0x8000800000008000ULL, 0x8000800000008080ULL, 0x8000800000800000ULL, 0x8000800000800080ULL, 0x8000800000808000ULL, 0x8000800000808080ULL,
		0x8000800080000000ULL, 0x8000800080000080ULL, 0x8000800080008000ULL, 0x8000800080008080ULL, 0x8000800080800000ULL, 0x8000800080800080ULL, 0x8000800080808000ULL, 0x8000800080808080ULL,
		0x8000808000000000ULL, 0x8000808000000080ULL, 0x8000808000008000ULL, 0x8000808000008080ULL, 0x8000808000800000ULL, 0x8000808000800080ULL, 0x8000808000808000ULL, 0x8000808000808080ULL,
		0x8000808080000000ULL, 0x8000808080000080ULL, 0x8000808080008000ULL, 0x8000808080008080ULL, 0x8000808080800000ULL, 0x8000808080800080ULL, 0x8000808080808000ULL, 0x8000808080808080ULL,
		0x8080000000000000ULL, 0x8080000000000080ULL, 0x8080000000008000ULL, 0x8080000000008080ULL, 0x8080000000800000ULL, 0x8080000000800080ULL, 0x8080000000808000ULL, 0x8080000000808080ULL,
		0x8080000080000000ULL, 0x8080000080000080ULL, 0x8080000080008000ULL, 0x8080000080008080ULL, 0x8080000080800000ULL, 0x8080000080800080ULL, 0x8080000080808000ULL, 0x8080000080808080ULL,
		0x8080008000000000ULL, 0x8080008000000080ULL, 0x8080008000008000ULL, 0x8080008000008080ULL, 0x8080008000800000ULL, 0x8080008000800080ULL, 0x8080008000808000ULL, 0x8080008000808080ULL,
		0x8080008080000000ULL, 0x8080008080000080ULL, 0x8080008080008000ULL, 0x8080008080008080ULL, 0x8080008080800000ULL, 0x8080008080800080ULL, 0x8080008080808000ULL, 0x8080008080808080ULL,
		0x8080800000000000ULL, 0x8080800000000080ULL, 0x8080800000008000ULL, 0x8080800000008080ULL, 0x8080800000800000ULL, 0x8080800000800080ULL, 0x8080800000808000ULL, 0x8080800000808080ULL,
		0x8080800080000000ULL, 0x8080800080000080ULL, 0x8080800080008000ULL, 0x8080800080008080ULL, 0x8080800080800000ULL, 0x8080800080800080ULL, 0x8080800080808000ULL, 0x8080800080808080ULL,
		0x8080808000000000ULL, 0x8080808000000080ULL, 0x8080808000008000ULL, 0x8080808000008080ULL, 0x8080808000800000ULL, 0x8080808000800080ULL, 0x8080808000808000ULL, 0x8080808000808080ULL,
		0x8080808080000000ULL, 0x8080808080000080ULL, 0x8080808080008000ULL, 0x8080808080008080ULL, 0x8080808080800000ULL, 0x8080808080800080ULL, 0x8080808080808000ULL, 0x8080808080808080ULL,
};

/** conversion from an 8-bit line to the D1-A4 line */
const unsigned long long D1A4[256] = {
		0x0000000000000000ULL, 0x0000000001000000ULL, 0x0000000000020000ULL, 0x0000000001020000ULL, 0x0000000000000400ULL, 0x0000000001000400ULL, 0x0000000000020400ULL, 0x0000000001020400ULL,
		0x0000000000000008ULL, 0x0000000001000008ULL, 0x0000000000020008ULL, 0x0000000001020008ULL, 0x0000000000000408ULL, 0x0000000001000408ULL, 0x0000000000020408ULL, 0x0000000001020408ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};
const unsigned long long E1A5[256] = {
		0x0000000000000000ULL, 0x0000000100000000ULL, 0x0000000002000000ULL, 0x0000000102000000ULL, 0x0000000000040000ULL, 0x0000000100040000ULL, 0x0000000002040000ULL, 0x0000000102040000ULL,
		0x0000000000000800ULL, 0x0000000100000800ULL, 0x0000000002000800ULL, 0x0000000102000800ULL, 0x0000000000040800ULL, 0x0000000100040800ULL, 0x0000000002040800ULL, 0x0000000102040800ULL,
		0x0000000000000010ULL, 0x0000000100000010ULL, 0x0000000002000010ULL, 0x0000000102000010ULL, 0x0000000000040010ULL, 0x0000000100040010ULL, 0x0000000002040010ULL, 0x0000000102040010ULL,
		0x0000000000000810ULL, 0x0000000100000810ULL, 0x0000000002000810ULL, 0x0000000102000810ULL, 0x0000000000040810ULL, 0x0000000100040810ULL, 0x0000000002040810ULL, 0x0000000102040810ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the F1-A6 line */
const unsigned long long F1A6[256] = {
		0x0000000000000000ULL, 0x0000010000000000ULL, 0x0000000200000000ULL, 0x0000010200000000ULL, 0x0000000004000000ULL, 0x0000010004000000ULL, 0x0000000204000000ULL, 0x0000010204000000ULL,
		0x0000000000080000ULL, 0x0000010000080000ULL, 0x0000000200080000ULL, 0x0000010200080000ULL, 0x0000000004080000ULL, 0x0000010004080000ULL, 0x0000000204080000ULL, 0x0000010204080000ULL,
		0x0000000000001000ULL, 0x0000010000001000ULL, 0x0000000200001000ULL, 0x0000010200001000ULL, 0x0000000004001000ULL, 0x0000010004001000ULL, 0x0000000204001000ULL, 0x0000010204001000ULL,
		0x0000000000081000ULL, 0x0000010000081000ULL, 0x0000000200081000ULL, 0x0000010200081000ULL, 0x0000000004081000ULL, 0x0000010004081000ULL, 0x0000000204081000ULL, 0x0000010204081000ULL,
		0x0000000000000020ULL, 0x0000010000000020ULL, 0x0000000200000020ULL, 0x0000010200000020ULL, 0x0000000004000020ULL, 0x0000010004000020ULL, 0x0000000204000020ULL, 0x0000010204000020ULL,
		0x0000000000080020ULL, 0x0000010000080020ULL, 0x0000000200080020ULL, 0x0000010200080020ULL, 0x0000000004080020ULL, 0x0000010004080020ULL, 0x0000000204080020ULL, 0x0000010204080020ULL,
		0x0000000000001020ULL, 0x0000010000001020ULL, 0x0000000200001020ULL, 0x0000010200001020ULL, 0x0000000004001020ULL, 0x0000010004001020ULL, 0x0000000204001020ULL, 0x0000010204001020ULL,
		0x0000000000081020ULL, 0x0000010000081020ULL, 0x0000000200081020ULL, 0x0000010200081020ULL, 0x0000000004081020ULL, 0x0000010004081020ULL, 0x0000000204081020ULL, 0x0000010204081020ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the G1-A7 line */
const unsigned long long G1A7[256] = {
		0x0000000000000000ULL, 0x0001000000000000ULL, 0x0000020000000000ULL, 0x0001020000000000ULL, 0x0000000400000000ULL, 0x0001000400000000ULL, 0x0000020400000000ULL, 0x0001020400000000ULL,
		0x0000000008000000ULL, 0x0001000008000000ULL, 0x0000020008000000ULL, 0x0001020008000000ULL, 0x0000000408000000ULL, 0x0001000408000000ULL, 0x0000020408000000ULL, 0x0001020408000000ULL,
		0x0000000000100000ULL, 0x0001000000100000ULL, 0x0000020000100000ULL, 0x0001020000100000ULL, 0x0000000400100000ULL, 0x0001000400100000ULL, 0x0000020400100000ULL, 0x0001020400100000ULL,
		0x0000000008100000ULL, 0x0001000008100000ULL, 0x0000020008100000ULL, 0x0001020008100000ULL, 0x0000000408100000ULL, 0x0001000408100000ULL, 0x0000020408100000ULL, 0x0001020408100000ULL,
		0x0000000000002000ULL, 0x0001000000002000ULL, 0x0000020000002000ULL, 0x0001020000002000ULL, 0x0000000400002000ULL, 0x0001000400002000ULL, 0x0000020400002000ULL, 0x0001020400002000ULL,
		0x0000000008002000ULL, 0x0001000008002000ULL, 0x0000020008002000ULL, 0x0001020008002000ULL, 0x0000000408002000ULL, 0x0001000408002000ULL, 0x0000020408002000ULL, 0x0001020408002000ULL,
		0x0000000000102000ULL, 0x0001000000102000ULL, 0x0000020000102000ULL, 0x0001020000102000ULL, 0x0000000400102000ULL, 0x0001000400102000ULL, 0x0000020400102000ULL, 0x0001020400102000ULL,
		0x0000000008102000ULL, 0x0001000008102000ULL, 0x0000020008102000ULL, 0x0001020008102000ULL, 0x0000000408102000ULL, 0x0001000408102000ULL, 0x0000020408102000ULL, 0x0001020408102000ULL,
		0x0000000000000040ULL, 0x0001000000000040ULL, 0x0000020000000040ULL, 0x0001020000000040ULL, 0x0000000400000040ULL, 0x0001000400000040ULL, 0x0000020400000040ULL, 0x0001020400000040ULL,
		0x0000000008000040ULL, 0x0001000008000040ULL, 0x0000020008000040ULL, 0x0001020008000040ULL, 0x0000000408000040ULL, 0x0001000408000040ULL, 0x0000020408000040ULL, 0x0001020408000040ULL,
		0x0000000000100040ULL, 0x0001000000100040ULL, 0x0000020000100040ULL, 0x0001020000100040ULL, 0x0000000400100040ULL, 0x0001000400100040ULL, 0x0000020400100040ULL, 0x0001020400100040ULL,
		0x0000000008100040ULL, 0x0001000008100040ULL, 0x0000020008100040ULL, 0x0001020008100040ULL, 0x0000000408100040ULL, 0x0001000408100040ULL, 0x0000020408100040ULL, 0x0001020408100040ULL,
		0x0000000000002040ULL, 0x0001000000002040ULL, 0x0000020000002040ULL, 0x0001020000002040ULL, 0x0000000400002040ULL, 0x0001000400002040ULL, 0x0000020400002040ULL, 0x0001020400002040ULL,
		0x0000000008002040ULL, 0x0001000008002040ULL, 0x0000020008002040ULL, 0x0001020008002040ULL, 0x0000000408002040ULL, 0x0001000408002040ULL, 0x0000020408002040ULL, 0x0001020408002040ULL,
		0x0000000000102040ULL, 0x0001000000102040ULL, 0x0000020000102040ULL, 0x0001020000102040ULL, 0x0000000400102040ULL, 0x0001000400102040ULL, 0x0000020400102040ULL, 0x0001020400102040ULL,
		0x0000000008102040ULL, 0x0001000008102040ULL, 0x0000020008102040ULL, 0x0001020008102040ULL, 0x0000000408102040ULL, 0x0001000408102040ULL, 0x0000020408102040ULL, 0x0001020408102040ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the H1-A8 line */
const unsigned long long H1A8[256] = {
		0x0000000000000000ULL, 0x0100000000000000ULL, 0x0002000000000000ULL, 0x0102000000000000ULL, 0x0000040000000000ULL, 0x0100040000000000ULL, 0x0002040000000000ULL, 0x0102040000000000ULL,
		0x0000000800000000ULL, 0x0100000800000000ULL, 0x0002000800000000ULL, 0x0102000800000000ULL, 0x0000040800000000ULL, 0x0100040800000000ULL, 0x0002040800000000ULL, 0x0102040800000000ULL,
		0x0000000010000000ULL, 0x0100000010000000ULL, 0x0002000010000000ULL, 0x0102000010000000ULL, 0x0000040010000000ULL, 0x0100040010000000ULL, 0x0002040010000000ULL, 0x0102040010000000ULL,
		0x0000000810000000ULL, 0x0100000810000000ULL, 0x0002000810000000ULL, 0x0102000810000000ULL, 0x0000040810000000ULL, 0x0100040810000000ULL, 0x0002040810000000ULL, 0x0102040810000000ULL,
		0x0000000000200000ULL, 0x0100000000200000ULL, 0x0002000000200000ULL, 0x0102000000200000ULL, 0x0000040000200000ULL, 0x0100040000200000ULL, 0x0002040000200000ULL, 0x0102040000200000ULL,
		0x0000000800200000ULL, 0x0100000800200000ULL, 0x0002000800200000ULL, 0x0102000800200000ULL, 0x0000040800200000ULL, 0x0100040800200000ULL, 0x0002040800200000ULL, 0x0102040800200000ULL,
		0x0000000010200000ULL, 0x0100000010200000ULL, 0x0002000010200000ULL, 0x0102000010200000ULL, 0x0000040010200000ULL, 0x0100040010200000ULL, 0x0002040010200000ULL, 0x0102040010200000ULL,
		0x0000000810200000ULL, 0x0100000810200000ULL, 0x0002000810200000ULL, 0x0102000810200000ULL, 0x0000040810200000ULL, 0x0100040810200000ULL, 0x0002040810200000ULL, 0x0102040810200000ULL,
		0x0000000000004000ULL, 0x0100000000004000ULL, 0x0002000000004000ULL, 0x0102000000004000ULL, 0x0000040000004000ULL, 0x0100040000004000ULL, 0x0002040000004000ULL, 0x0102040000004000ULL,
		0x0000000800004000ULL, 0x0100000800004000ULL, 0x0002000800004000ULL, 0x0102000800004000ULL, 0x0000040800004000ULL, 0x0100040800004000ULL, 0x0002040800004000ULL, 0x0102040800004000ULL,
		0x0000000010004000ULL, 0x0100000010004000ULL, 0x0002000010004000ULL, 0x0102000010004000ULL, 0x0000040010004000ULL, 0x0100040010004000ULL, 0x0002040010004000ULL, 0x0102040010004000ULL,
		0x0000000810004000ULL, 0x0100000810004000ULL, 0x0002000810004000ULL, 0x0102000810004000ULL, 0x0000040810004000ULL, 0x0100040810004000ULL, 0x0002040810004000ULL, 0x0102040810004000ULL,
		0x0000000000204000ULL, 0x0100000000204000ULL, 0x0002000000204000ULL, 0x0102000000204000ULL, 0x0000040000204000ULL, 0x0100040000204000ULL, 0x0002040000204000ULL, 0x0102040000204000ULL,
		0x0000000800204000ULL, 0x0100000800204000ULL, 0x0002000800204000ULL, 0x0102000800204000ULL, 0x0000040800204000ULL, 0x0100040800204000ULL, 0x0002040800204000ULL, 0x0102040800204000ULL,
		0x0000000010204000ULL, 0x0100000010204000ULL, 0x0002000010204000ULL, 0x0102000010204000ULL, 0x0000040010204000ULL, 0x0100040010204000ULL, 0x0002040010204000ULL, 0x0102040010204000ULL,
		0x0000000810204000ULL, 0x0100000810204000ULL, 0x0002000810204000ULL, 0x0102000810204000ULL, 0x0000040810204000ULL, 0x0100040810204000ULL, 0x0002040810204000ULL, 0x0102040810204000ULL,
		0x0000000000000080ULL, 0x0100000000000080ULL, 0x0002000000000080ULL, 0x0102000000000080ULL, 0x0000040000000080ULL, 0x0100040000000080ULL, 0x0002040000000080ULL, 0x0102040000000080ULL,
		0x0000000800000080ULL, 0x0100000800000080ULL, 0x0002000800000080ULL, 0x0102000800000080ULL, 0x0000040800000080ULL, 0x0100040800000080ULL, 0x0002040800000080ULL, 0x0102040800000080ULL,
		0x0000000010000080ULL, 0x0100000010000080ULL, 0x0002000010000080ULL, 0x0102000010000080ULL, 0x0000040010000080ULL, 0x0100040010000080ULL, 0x0002040010000080ULL, 0x0102040010000080ULL,
		0x0000000810000080ULL, 0x0100000810000080ULL, 0x0002000810000080ULL, 0x0102000810000080ULL, 0x0000040810000080ULL, 0x0100040810000080ULL, 0x0002040810000080ULL, 0x0102040810000080ULL,
		0x0000000000200080ULL, 0x0100000000200080ULL, 0x0002000000200080ULL, 0x0102000000200080ULL, 0x0000040000200080ULL, 0x0100040000200080ULL, 0x0002040000200080ULL, 0x0102040000200080ULL,
		0x0000000800200080ULL, 0x0100000800200080ULL, 0x0002000800200080ULL, 0x0102000800200080ULL, 0x0000040800200080ULL, 0x0100040800200080ULL, 0x0002040800200080ULL, 0x0102040800200080ULL,
		0x0000000010200080ULL, 0x0100000010200080ULL, 0x0002000010200080ULL, 0x0102000010200080ULL, 0x0000040010200080ULL, 0x0100040010200080ULL, 0x0002040010200080ULL, 0x0102040010200080ULL,
		0x0000000810200080ULL, 0x0100000810200080ULL, 0x0002000810200080ULL, 0x0102000810200080ULL, 0x0000040810200080ULL, 0x0100040810200080ULL, 0x0002040810200080ULL, 0x0102040810200080ULL,
		0x0000000000004080ULL, 0x0100000000004080ULL, 0x0002000000004080ULL, 0x0102000000004080ULL, 0x0000040000004080ULL, 0x0100040000004080ULL, 0x0002040000004080ULL, 0x0102040000004080ULL,
		0x0000000800004080ULL, 0x0100000800004080ULL, 0x0002000800004080ULL, 0x0102000800004080ULL, 0x0000040800004080ULL, 0x0100040800004080ULL, 0x0002040800004080ULL, 0x0102040800004080ULL,
		0x0000000010004080ULL, 0x0100000010004080ULL, 0x0002000010004080ULL, 0x0102000010004080ULL, 0x0000040010004080ULL, 0x0100040010004080ULL, 0x0002040010004080ULL, 0x0102040010004080ULL,
		0x0000000810004080ULL, 0x0100000810004080ULL, 0x0002000810004080ULL, 0x0102000810004080ULL, 0x0000040810004080ULL, 0x0100040810004080ULL, 0x0002040810004080ULL, 0x0102040810004080ULL,
		0x0000000000204080ULL, 0x0100000000204080ULL, 0x0002000000204080ULL, 0x0102000000204080ULL, 0x0000040000204080ULL, 0x0100040000204080ULL, 0x0002040000204080ULL, 0x0102040000204080ULL,
		0x0000000800204080ULL, 0x0100000800204080ULL, 0x0002000800204080ULL, 0x0102000800204080ULL, 0x0000040800204080ULL, 0x0100040800204080ULL, 0x0002040800204080ULL, 0x0102040800204080ULL,
		0x0000000010204080ULL, 0x0100000010204080ULL, 0x0002000010204080ULL, 0x0102000010204080ULL, 0x0000040010204080ULL, 0x0100040010204080ULL, 0x0002040010204080ULL, 0x0102040010204080ULL,
		0x0000000810204080ULL, 0x0100000810204080ULL, 0x0002000810204080ULL, 0x0102000810204080ULL, 0x0000040810204080ULL, 0x0100040810204080ULL, 0x0002040810204080ULL, 0x0102040810204080ULL,
};

/** conversion from an 8-bit line to the H2-B8 line */
const unsigned long long H2B8[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0200000000000000ULL, 0x0000000000000000ULL, 0x0004000000000000ULL, 0x0000000000000000ULL, 0x0204000000000000ULL, 0x0000000000000000ULL,
		0x0000080000000000ULL, 0x0000000000000000ULL, 0x0200080000000000ULL, 0x0000000000000000ULL, 0x0004080000000000ULL, 0x0000000000000000ULL, 0x0204080000000000ULL, 0x0000000000000000ULL,
		0x0000001000000000ULL, 0x0000000000000000ULL, 0x0200001000000000ULL, 0x0000000000000000ULL, 0x0004001000000000ULL, 0x0000000000000000ULL, 0x0204001000000000ULL, 0x0000000000000000ULL,
		0x0000081000000000ULL, 0x0000000000000000ULL, 0x0200081000000000ULL, 0x0000000000000000ULL, 0x0004081000000000ULL, 0x0000000000000000ULL, 0x0204081000000000ULL, 0x0000000000000000ULL,
		0x0000000020000000ULL, 0x0000000000000000ULL, 0x0200000020000000ULL, 0x0000000000000000ULL, 0x0004000020000000ULL, 0x0000000000000000ULL, 0x0204000020000000ULL, 0x0000000000000000ULL,
		0x0000080020000000ULL, 0x0000000000000000ULL, 0x0200080020000000ULL, 0x0000000000000000ULL, 0x0004080020000000ULL, 0x0000000000000000ULL, 0x0204080020000000ULL, 0x0000000000000000ULL,
		0x0000001020000000ULL, 0x0000000000000000ULL, 0x0200001020000000ULL, 0x0000000000000000ULL, 0x0004001020000000ULL, 0x0000000000000000ULL, 0x0204001020000000ULL, 0x0000000000000000ULL,
		0x0000081020000000ULL, 0x0000000000000000ULL, 0x0200081020000000ULL, 0x0000000000000000ULL, 0x0004081020000000ULL, 0x0000000000000000ULL, 0x0204081020000000ULL, 0x0000000000000000ULL,
		0x0000000000400000ULL, 0x0000000000000000ULL, 0x0200000000400000ULL, 0x0000000000000000ULL, 0x0004000000400000ULL, 0x0000000000000000ULL, 0x0204000000400000ULL, 0x0000000000000000ULL,
		0x0000080000400000ULL, 0x0000000000000000ULL, 0x0200080000400000ULL, 0x0000000000000000ULL, 0x0004080000400000ULL, 0x0000000000000000ULL, 0x0204080000400000ULL, 0x0000000000000000ULL,
		0x0000001000400000ULL, 0x0000000000000000ULL, 0x0200001000400000ULL, 0x0000000000000000ULL, 0x0004001000400000ULL, 0x0000000000000000ULL, 0x0204001000400000ULL, 0x0000000000000000ULL,
		0x0000081000400000ULL, 0x0000000000000000ULL, 0x0200081000400000ULL, 0x0000000000000000ULL, 0x0004081000400000ULL, 0x0000000000000000ULL, 0x0204081000400000ULL, 0x0000000000000000ULL,
		0x0000000020400000ULL, 0x0000000000000000ULL, 0x0200000020400000ULL, 0x0000000000000000ULL, 0x0004000020400000ULL, 0x0000000000000000ULL, 0x0204000020400000ULL, 0x0000000000000000ULL,
		0x0000080020400000ULL, 0x0000000000000000ULL, 0x0200080020400000ULL, 0x0000000000000000ULL, 0x0004080020400000ULL, 0x0000000000000000ULL, 0x0204080020400000ULL, 0x0000000000000000ULL,
		0x0000001020400000ULL, 0x0000000000000000ULL, 0x0200001020400000ULL, 0x0000000000000000ULL, 0x0004001020400000ULL, 0x0000000000000000ULL, 0x0204001020400000ULL, 0x0000000000000000ULL,
		0x0000081020400000ULL, 0x0000000000000000ULL, 0x0200081020400000ULL, 0x0000000000000000ULL, 0x0004081020400000ULL, 0x0000000000000000ULL, 0x0204081020400000ULL, 0x0000000000000000ULL,
		0x0000000000008000ULL, 0x0000000000000000ULL, 0x0200000000008000ULL, 0x0000000000000000ULL, 0x0004000000008000ULL, 0x0000000000000000ULL, 0x0204000000008000ULL, 0x0000000000000000ULL,
		0x0000080000008000ULL, 0x0000000000000000ULL, 0x0200080000008000ULL, 0x0000000000000000ULL, 0x0004080000008000ULL, 0x0000000000000000ULL, 0x0204080000008000ULL, 0x0000000000000000ULL,
		0x0000001000008000ULL, 0x0000000000000000ULL, 0x0200001000008000ULL, 0x0000000000000000ULL, 0x0004001000008000ULL, 0x0000000000000000ULL, 0x0204001000008000ULL, 0x0000000000000000ULL,
		0x0000081000008000ULL, 0x0000000000000000ULL, 0x0200081000008000ULL, 0x0000000000000000ULL, 0x0004081000008000ULL, 0x0000000000000000ULL, 0x0204081000008000ULL, 0x0000000000000000ULL,
		0x0000000020008000ULL, 0x0000000000000000ULL, 0x0200000020008000ULL, 0x0000000000000000ULL, 0x0004000020008000ULL, 0x0000000000000000ULL, 0x0204000020008000ULL, 0x0000000000000000ULL,
		0x0000080020008000ULL, 0x0000000000000000ULL, 0x0200080020008000ULL, 0x0000000000000000ULL, 0x0004080020008000ULL, 0x0000000000000000ULL, 0x0204080020008000ULL, 0x0000000000000000ULL,
		0x0000001020008000ULL, 0x0000000000000000ULL, 0x0200001020008000ULL, 0x0000000000000000ULL, 0x0004001020008000ULL, 0x0000000000000000ULL, 0x0204001020008000ULL, 0x0000000000000000ULL,
		0x0000081020008000ULL, 0x0000000000000000ULL, 0x0200081020008000ULL, 0x0000000000000000ULL, 0x0004081020008000ULL, 0x0000000000000000ULL, 0x0204081020008000ULL, 0x0000000000000000ULL,
		0x0000000000408000ULL, 0x0000000000000000ULL, 0x0200000000408000ULL, 0x0000000000000000ULL, 0x0004000000408000ULL, 0x0000000000000000ULL, 0x0204000000408000ULL, 0x0000000000000000ULL,
		0x0000080000408000ULL, 0x0000000000000000ULL, 0x0200080000408000ULL, 0x0000000000000000ULL, 0x0004080000408000ULL, 0x0000000000000000ULL, 0x0204080000408000ULL, 0x0000000000000000ULL,
		0x0000001000408000ULL, 0x0000000000000000ULL, 0x0200001000408000ULL, 0x0000000000000000ULL, 0x0004001000408000ULL, 0x0000000000000000ULL, 0x0204001000408000ULL, 0x0000000000000000ULL,
		0x0000081000408000ULL, 0x0000000000000000ULL, 0x0200081000408000ULL, 0x0000000000000000ULL, 0x0004081000408000ULL, 0x0000000000000000ULL, 0x0204081000408000ULL, 0x0000000000000000ULL,
		0x0000000020408000ULL, 0x0000000000000000ULL, 0x0200000020408000ULL, 0x0000000000000000ULL, 0x0004000020408000ULL, 0x0000000000000000ULL, 0x0204000020408000ULL, 0x0000000000000000ULL,
		0x0000080020408000ULL, 0x0000000000000000ULL, 0x0200080020408000ULL, 0x0000000000000000ULL, 0x0004080020408000ULL, 0x0000000000000000ULL, 0x0204080020408000ULL, 0x0000000000000000ULL,
		0x0000001020408000ULL, 0x0000000000000000ULL, 0x0200001020408000ULL, 0x0000000000000000ULL, 0x0004001020408000ULL, 0x0000000000000000ULL, 0x0204001020408000ULL, 0x0000000000000000ULL,
		0x0000081020408000ULL, 0x0000000000000000ULL, 0x0200081020408000ULL, 0x0000000000000000ULL, 0x0004081020408000ULL, 0x0000000000000000ULL, 0x0204081020408000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the H3-C8 line */
const unsigned long long H3C8[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000100000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400100000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008100000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408100000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000002000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400002000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008002000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408002000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000102000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400102000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008102000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408102000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400000040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008000040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408000040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000100040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400100040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008100040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408100040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000002040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400002040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008002040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408002040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000102040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400102040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008102040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408102040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400000000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008000000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408000000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000100000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400100000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008100000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408100000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000002000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400002000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008002000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408002000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000102000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400102000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008102000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408102000800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400000040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008000040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408000040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000100040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400100040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008100040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408100040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000002040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400002040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008002040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408002040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000102040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0400102040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0008102040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0408102040800000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};
const unsigned long long H4D8[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000200000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800200000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010200000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810200000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800004000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010004000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810004000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000204000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800204000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010204000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810204000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800000080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010000080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810000080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000200080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800200080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010200080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810200080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800004080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010004080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810004080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000204080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0800204080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0010204080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0810204080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the H5-E8 line */
const unsigned long long H5E8[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0020000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1020000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000400000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1000400000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0020400000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1020400000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1000008000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0020008000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1020008000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000408000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1000408000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0020408000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x1020408000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the A5-D8 line */
const unsigned long long A5D8[256] = {
		0x0000000000000000ULL, 0x0000000100000000ULL, 0x0000020000000000ULL, 0x0000020100000000ULL, 0x0004000000000000ULL, 0x0004000100000000ULL, 0x0004020000000000ULL, 0x0004020100000000ULL,
		0x0800000000000000ULL, 0x0800000100000000ULL, 0x0800020000000000ULL, 0x0800020100000000ULL, 0x0804000000000000ULL, 0x0804000100000000ULL, 0x0804020000000000ULL, 0x0804020100000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the A4-E8 line */
const unsigned long long A4E8[256] = {
		0x0000000000000000ULL, 0x0000000001000000ULL, 0x0000000200000000ULL, 0x0000000201000000ULL, 0x0000040000000000ULL, 0x0000040001000000ULL, 0x0000040200000000ULL, 0x0000040201000000ULL,
		0x0008000000000000ULL, 0x0008000001000000ULL, 0x0008000200000000ULL, 0x0008000201000000ULL, 0x0008040000000000ULL, 0x0008040001000000ULL, 0x0008040200000000ULL, 0x0008040201000000ULL,
		0x1000000000000000ULL, 0x1000000001000000ULL, 0x1000000200000000ULL, 0x1000000201000000ULL, 0x1000040000000000ULL, 0x1000040001000000ULL, 0x1000040200000000ULL, 0x1000040201000000ULL,
		0x1008000000000000ULL, 0x1008000001000000ULL, 0x1008000200000000ULL, 0x1008000201000000ULL, 0x1008040000000000ULL, 0x1008040001000000ULL, 0x1008040200000000ULL, 0x1008040201000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the A3-F8 line */
const unsigned long long A3F8[256] = {
		0x0000000000000000ULL, 0x0000000000010000ULL, 0x0000000002000000ULL, 0x0000000002010000ULL, 0x0000000400000000ULL, 0x0000000400010000ULL, 0x0000000402000000ULL, 0x0000000402010000ULL,
		0x0000080000000000ULL, 0x0000080000010000ULL, 0x0000080002000000ULL, 0x0000080002010000ULL, 0x0000080400000000ULL, 0x0000080400010000ULL, 0x0000080402000000ULL, 0x0000080402010000ULL,
		0x0010000000000000ULL, 0x0010000000010000ULL, 0x0010000002000000ULL, 0x0010000002010000ULL, 0x0010000400000000ULL, 0x0010000400010000ULL, 0x0010000402000000ULL, 0x0010000402010000ULL,
		0x0010080000000000ULL, 0x0010080000010000ULL, 0x0010080002000000ULL, 0x0010080002010000ULL, 0x0010080400000000ULL, 0x0010080400010000ULL, 0x0010080402000000ULL, 0x0010080402010000ULL,
		0x2000000000000000ULL, 0x2000000000010000ULL, 0x2000000002000000ULL, 0x2000000002010000ULL, 0x2000000400000000ULL, 0x2000000400010000ULL, 0x2000000402000000ULL, 0x2000000402010000ULL,
		0x2000080000000000ULL, 0x2000080000010000ULL, 0x2000080002000000ULL, 0x2000080002010000ULL, 0x2000080400000000ULL, 0x2000080400010000ULL, 0x2000080402000000ULL, 0x2000080402010000ULL,
		0x2010000000000000ULL, 0x2010000000010000ULL, 0x2010000002000000ULL, 0x2010000002010000ULL, 0x2010000400000000ULL, 0x2010000400010000ULL, 0x2010000402000000ULL, 0x2010000402010000ULL,
		0x2010080000000000ULL, 0x2010080000010000ULL, 0x2010080002000000ULL, 0x2010080002010000ULL, 0x2010080400000000ULL, 0x2010080400010000ULL, 0x2010080402000000ULL, 0x2010080402010000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the A2-G8 line */
const unsigned long long A2G8[256] = {
		0x0000000000000000ULL, 0x0000000000000100ULL, 0x0000000000020000ULL, 0x0000000000020100ULL, 0x0000000004000000ULL, 0x0000000004000100ULL, 0x0000000004020000ULL, 0x0000000004020100ULL,
		0x0000000800000000ULL, 0x0000000800000100ULL, 0x0000000800020000ULL, 0x0000000800020100ULL, 0x0000000804000000ULL, 0x0000000804000100ULL, 0x0000000804020000ULL, 0x0000000804020100ULL,
		0x0000100000000000ULL, 0x0000100000000100ULL, 0x0000100000020000ULL, 0x0000100000020100ULL, 0x0000100004000000ULL, 0x0000100004000100ULL, 0x0000100004020000ULL, 0x0000100004020100ULL,
		0x0000100800000000ULL, 0x0000100800000100ULL, 0x0000100800020000ULL, 0x0000100800020100ULL, 0x0000100804000000ULL, 0x0000100804000100ULL, 0x0000100804020000ULL, 0x0000100804020100ULL,
		0x0020000000000000ULL, 0x0020000000000100ULL, 0x0020000000020000ULL, 0x0020000000020100ULL, 0x0020000004000000ULL, 0x0020000004000100ULL, 0x0020000004020000ULL, 0x0020000004020100ULL,
		0x0020000800000000ULL, 0x0020000800000100ULL, 0x0020000800020000ULL, 0x0020000800020100ULL, 0x0020000804000000ULL, 0x0020000804000100ULL, 0x0020000804020000ULL, 0x0020000804020100ULL,
		0x0020100000000000ULL, 0x0020100000000100ULL, 0x0020100000020000ULL, 0x0020100000020100ULL, 0x0020100004000000ULL, 0x0020100004000100ULL, 0x0020100004020000ULL, 0x0020100004020100ULL,
		0x0020100800000000ULL, 0x0020100800000100ULL, 0x0020100800020000ULL, 0x0020100800020100ULL, 0x0020100804000000ULL, 0x0020100804000100ULL, 0x0020100804020000ULL, 0x0020100804020100ULL,
		0x4000000000000000ULL, 0x4000000000000100ULL, 0x4000000000020000ULL, 0x4000000000020100ULL, 0x4000000004000000ULL, 0x4000000004000100ULL, 0x4000000004020000ULL, 0x4000000004020100ULL,
		0x4000000800000000ULL, 0x4000000800000100ULL, 0x4000000800020000ULL, 0x4000000800020100ULL, 0x4000000804000000ULL, 0x4000000804000100ULL, 0x4000000804020000ULL, 0x4000000804020100ULL,
		0x4000100000000000ULL, 0x4000100000000100ULL, 0x4000100000020000ULL, 0x4000100000020100ULL, 0x4000100004000000ULL, 0x4000100004000100ULL, 0x4000100004020000ULL, 0x4000100004020100ULL,
		0x4000100800000000ULL, 0x4000100800000100ULL, 0x4000100800020000ULL, 0x4000100800020100ULL, 0x4000100804000000ULL, 0x4000100804000100ULL, 0x4000100804020000ULL, 0x4000100804020100ULL,
		0x4020000000000000ULL, 0x4020000000000100ULL, 0x4020000000020000ULL, 0x4020000000020100ULL, 0x4020000004000000ULL, 0x4020000004000100ULL, 0x4020000004020000ULL, 0x4020000004020100ULL,
		0x4020000800000000ULL, 0x4020000800000100ULL, 0x4020000800020000ULL, 0x4020000800020100ULL, 0x4020000804000000ULL, 0x4020000804000100ULL, 0x4020000804020000ULL, 0x4020000804020100ULL,
		0x4020100000000000ULL, 0x4020100000000100ULL, 0x4020100000020000ULL, 0x4020100000020100ULL, 0x4020100004000000ULL, 0x4020100004000100ULL, 0x4020100004020000ULL, 0x4020100004020100ULL,
		0x4020100800000000ULL, 0x4020100800000100ULL, 0x4020100800020000ULL, 0x4020100800020100ULL, 0x4020100804000000ULL, 0x4020100804000100ULL, 0x4020100804020000ULL, 0x4020100804020100ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the A1-H8 line */
const unsigned long long A1H8[256] = {
		0x0000000000000000ULL, 0x0000000000000001ULL, 0x0000000000000200ULL, 0x0000000000000201ULL, 0x0000000000040000ULL, 0x0000000000040001ULL, 0x0000000000040200ULL, 0x0000000000040201ULL,
		0x0000000008000000ULL, 0x0000000008000001ULL, 0x0000000008000200ULL, 0x0000000008000201ULL, 0x0000000008040000ULL, 0x0000000008040001ULL, 0x0000000008040200ULL, 0x0000000008040201ULL,
		0x0000001000000000ULL, 0x0000001000000001ULL, 0x0000001000000200ULL, 0x0000001000000201ULL, 0x0000001000040000ULL, 0x0000001000040001ULL, 0x0000001000040200ULL, 0x0000001000040201ULL,
		0x0000001008000000ULL, 0x0000001008000001ULL, 0x0000001008000200ULL, 0x0000001008000201ULL, 0x0000001008040000ULL, 0x0000001008040001ULL, 0x0000001008040200ULL, 0x0000001008040201ULL,
		0x0000200000000000ULL, 0x0000200000000001ULL, 0x0000200000000200ULL, 0x0000200000000201ULL, 0x0000200000040000ULL, 0x0000200000040001ULL, 0x0000200000040200ULL, 0x0000200000040201ULL,
		0x0000200008000000ULL, 0x0000200008000001ULL, 0x0000200008000200ULL, 0x0000200008000201ULL, 0x0000200008040000ULL, 0x0000200008040001ULL, 0x0000200008040200ULL, 0x0000200008040201ULL,
		0x0000201000000000ULL, 0x0000201000000001ULL, 0x0000201000000200ULL, 0x0000201000000201ULL, 0x0000201000040000ULL, 0x0000201000040001ULL, 0x0000201000040200ULL, 0x0000201000040201ULL,
		0x0000201008000000ULL, 0x0000201008000001ULL, 0x0000201008000200ULL, 0x0000201008000201ULL, 0x0000201008040000ULL, 0x0000201008040001ULL, 0x0000201008040200ULL, 0x0000201008040201ULL,
		0x0040000000000000ULL, 0x0040000000000001ULL, 0x0040000000000200ULL, 0x0040000000000201ULL, 0x0040000000040000ULL, 0x0040000000040001ULL, 0x0040000000040200ULL, 0x0040000000040201ULL,
		0x0040000008000000ULL, 0x0040000008000001ULL, 0x0040000008000200ULL, 0x0040000008000201ULL, 0x0040000008040000ULL, 0x0040000008040001ULL, 0x0040000008040200ULL, 0x0040000008040201ULL,
		0x0040001000000000ULL, 0x0040001000000001ULL, 0x0040001000000200ULL, 0x0040001000000201ULL, 0x0040001000040000ULL, 0x0040001000040001ULL, 0x0040001000040200ULL, 0x0040001000040201ULL,
		0x0040001008000000ULL, 0x0040001008000001ULL, 0x0040001008000200ULL, 0x0040001008000201ULL, 0x0040001008040000ULL, 0x0040001008040001ULL, 0x0040001008040200ULL, 0x0040001008040201ULL,
		0x0040200000000000ULL, 0x0040200000000001ULL, 0x0040200000000200ULL, 0x0040200000000201ULL, 0x0040200000040000ULL, 0x0040200000040001ULL, 0x0040200000040200ULL, 0x0040200000040201ULL,
		0x0040200008000000ULL, 0x0040200008000001ULL, 0x0040200008000200ULL, 0x0040200008000201ULL, 0x0040200008040000ULL, 0x0040200008040001ULL, 0x0040200008040200ULL, 0x0040200008040201ULL,
		0x0040201000000000ULL, 0x0040201000000001ULL, 0x0040201000000200ULL, 0x0040201000000201ULL, 0x0040201000040000ULL, 0x0040201000040001ULL, 0x0040201000040200ULL, 0x0040201000040201ULL,
		0x0040201008000000ULL, 0x0040201008000001ULL, 0x0040201008000200ULL, 0x0040201008000201ULL, 0x0040201008040000ULL, 0x0040201008040001ULL, 0x0040201008040200ULL, 0x0040201008040201ULL,
		0x8000000000000000ULL, 0x8000000000000001ULL, 0x8000000000000200ULL, 0x8000000000000201ULL, 0x8000000000040000ULL, 0x8000000000040001ULL, 0x8000000000040200ULL, 0x8000000000040201ULL,
		0x8000000008000000ULL, 0x8000000008000001ULL, 0x8000000008000200ULL, 0x8000000008000201ULL, 0x8000000008040000ULL, 0x8000000008040001ULL, 0x8000000008040200ULL, 0x8000000008040201ULL,
		0x8000001000000000ULL, 0x8000001000000001ULL, 0x8000001000000200ULL, 0x8000001000000201ULL, 0x8000001000040000ULL, 0x8000001000040001ULL, 0x8000001000040200ULL, 0x8000001000040201ULL,
		0x8000001008000000ULL, 0x8000001008000001ULL, 0x8000001008000200ULL, 0x8000001008000201ULL, 0x8000001008040000ULL, 0x8000001008040001ULL, 0x8000001008040200ULL, 0x8000001008040201ULL,
		0x8000200000000000ULL, 0x8000200000000001ULL, 0x8000200000000200ULL, 0x8000200000000201ULL, 0x8000200000040000ULL, 0x8000200000040001ULL, 0x8000200000040200ULL, 0x8000200000040201ULL,
		0x8000200008000000ULL, 0x8000200008000001ULL, 0x8000200008000200ULL, 0x8000200008000201ULL, 0x8000200008040000ULL, 0x8000200008040001ULL, 0x8000200008040200ULL, 0x8000200008040201ULL,
		0x8000201000000000ULL, 0x8000201000000001ULL, 0x8000201000000200ULL, 0x8000201000000201ULL, 0x8000201000040000ULL, 0x8000201000040001ULL, 0x8000201000040200ULL, 0x8000201000040201ULL,
		0x8000201008000000ULL, 0x8000201008000001ULL, 0x8000201008000200ULL, 0x8000201008000201ULL, 0x8000201008040000ULL, 0x8000201008040001ULL, 0x8000201008040200ULL, 0x8000201008040201ULL,
		0x8040000000000000ULL, 0x8040000000000001ULL, 0x8040000000000200ULL, 0x8040000000000201ULL, 0x8040000000040000ULL, 0x8040000000040001ULL, 0x8040000000040200ULL, 0x8040000000040201ULL,
		0x8040000008000000ULL, 0x8040000008000001ULL, 0x8040000008000200ULL, 0x8040000008000201ULL, 0x8040000008040000ULL, 0x8040000008040001ULL, 0x8040000008040200ULL, 0x8040000008040201ULL,
		0x8040001000000000ULL, 0x8040001000000001ULL, 0x8040001000000200ULL, 0x8040001000000201ULL, 0x8040001000040000ULL, 0x8040001000040001ULL, 0x8040001000040200ULL, 0x8040001000040201ULL,
		0x8040001008000000ULL, 0x8040001008000001ULL, 0x8040001008000200ULL, 0x8040001008000201ULL, 0x8040001008040000ULL, 0x8040001008040001ULL, 0x8040001008040200ULL, 0x8040001008040201ULL,
		0x8040200000000000ULL, 0x8040200000000001ULL, 0x8040200000000200ULL, 0x8040200000000201ULL, 0x8040200000040000ULL, 0x8040200000040001ULL, 0x8040200000040200ULL, 0x8040200000040201ULL,
		0x8040200008000000ULL, 0x8040200008000001ULL, 0x8040200008000200ULL, 0x8040200008000201ULL, 0x8040200008040000ULL, 0x8040200008040001ULL, 0x8040200008040200ULL, 0x8040200008040201ULL,
		0x8040201000000000ULL, 0x8040201000000001ULL, 0x8040201000000200ULL, 0x8040201000000201ULL, 0x8040201000040000ULL, 0x8040201000040001ULL, 0x8040201000040200ULL, 0x8040201000040201ULL,
		0x8040201008000000ULL, 0x8040201008000001ULL, 0x8040201008000200ULL, 0x8040201008000201ULL, 0x8040201008040000ULL, 0x8040201008040001ULL, 0x8040201008040200ULL, 0x8040201008040201ULL,
};

/** conversion from an 8-bit line to the B1-H7 line */
const unsigned long long B1H7[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000002ULL, 0x0000000000000000ULL, 0x0000000000000400ULL, 0x0000000000000000ULL, 0x0000000000000402ULL, 0x0000000000000000ULL,
		0x0000000000080000ULL, 0x0000000000000000ULL, 0x0000000000080002ULL, 0x0000000000000000ULL, 0x0000000000080400ULL, 0x0000000000000000ULL, 0x0000000000080402ULL, 0x0000000000000000ULL,
		0x0000000010000000ULL, 0x0000000000000000ULL, 0x0000000010000002ULL, 0x0000000000000000ULL, 0x0000000010000400ULL, 0x0000000000000000ULL, 0x0000000010000402ULL, 0x0000000000000000ULL,
		0x0000000010080000ULL, 0x0000000000000000ULL, 0x0000000010080002ULL, 0x0000000000000000ULL, 0x0000000010080400ULL, 0x0000000000000000ULL, 0x0000000010080402ULL, 0x0000000000000000ULL,
		0x0000002000000000ULL, 0x0000000000000000ULL, 0x0000002000000002ULL, 0x0000000000000000ULL, 0x0000002000000400ULL, 0x0000000000000000ULL, 0x0000002000000402ULL, 0x0000000000000000ULL,
		0x0000002000080000ULL, 0x0000000000000000ULL, 0x0000002000080002ULL, 0x0000000000000000ULL, 0x0000002000080400ULL, 0x0000000000000000ULL, 0x0000002000080402ULL, 0x0000000000000000ULL,
		0x0000002010000000ULL, 0x0000000000000000ULL, 0x0000002010000002ULL, 0x0000000000000000ULL, 0x0000002010000400ULL, 0x0000000000000000ULL, 0x0000002010000402ULL, 0x0000000000000000ULL,
		0x0000002010080000ULL, 0x0000000000000000ULL, 0x0000002010080002ULL, 0x0000000000000000ULL, 0x0000002010080400ULL, 0x0000000000000000ULL, 0x0000002010080402ULL, 0x0000000000000000ULL,
		0x0000400000000000ULL, 0x0000000000000000ULL, 0x0000400000000002ULL, 0x0000000000000000ULL, 0x0000400000000400ULL, 0x0000000000000000ULL, 0x0000400000000402ULL, 0x0000000000000000ULL,
		0x0000400000080000ULL, 0x0000000000000000ULL, 0x0000400000080002ULL, 0x0000000000000000ULL, 0x0000400000080400ULL, 0x0000000000000000ULL, 0x0000400000080402ULL, 0x0000000000000000ULL,
		0x0000400010000000ULL, 0x0000000000000000ULL, 0x0000400010000002ULL, 0x0000000000000000ULL, 0x0000400010000400ULL, 0x0000000000000000ULL, 0x0000400010000402ULL, 0x0000000000000000ULL,
		0x0000400010080000ULL, 0x0000000000000000ULL, 0x0000400010080002ULL, 0x0000000000000000ULL, 0x0000400010080400ULL, 0x0000000000000000ULL, 0x0000400010080402ULL, 0x0000000000000000ULL,
		0x0000402000000000ULL, 0x0000000000000000ULL, 0x0000402000000002ULL, 0x0000000000000000ULL, 0x0000402000000400ULL, 0x0000000000000000ULL, 0x0000402000000402ULL, 0x0000000000000000ULL,
		0x0000402000080000ULL, 0x0000000000000000ULL, 0x0000402000080002ULL, 0x0000000000000000ULL, 0x0000402000080400ULL, 0x0000000000000000ULL, 0x0000402000080402ULL, 0x0000000000000000ULL,
		0x0000402010000000ULL, 0x0000000000000000ULL, 0x0000402010000002ULL, 0x0000000000000000ULL, 0x0000402010000400ULL, 0x0000000000000000ULL, 0x0000402010000402ULL, 0x0000000000000000ULL,
		0x0000402010080000ULL, 0x0000000000000000ULL, 0x0000402010080002ULL, 0x0000000000000000ULL, 0x0000402010080400ULL, 0x0000000000000000ULL, 0x0000402010080402ULL, 0x0000000000000000ULL,
		0x0080000000000000ULL, 0x0000000000000000ULL, 0x0080000000000002ULL, 0x0000000000000000ULL, 0x0080000000000400ULL, 0x0000000000000000ULL, 0x0080000000000402ULL, 0x0000000000000000ULL,
		0x0080000000080000ULL, 0x0000000000000000ULL, 0x0080000000080002ULL, 0x0000000000000000ULL, 0x0080000000080400ULL, 0x0000000000000000ULL, 0x0080000000080402ULL, 0x0000000000000000ULL,
		0x0080000010000000ULL, 0x0000000000000000ULL, 0x0080000010000002ULL, 0x0000000000000000ULL, 0x0080000010000400ULL, 0x0000000000000000ULL, 0x0080000010000402ULL, 0x0000000000000000ULL,
		0x0080000010080000ULL, 0x0000000000000000ULL, 0x0080000010080002ULL, 0x0000000000000000ULL, 0x0080000010080400ULL, 0x0000000000000000ULL, 0x0080000010080402ULL, 0x0000000000000000ULL,
		0x0080002000000000ULL, 0x0000000000000000ULL, 0x0080002000000002ULL, 0x0000000000000000ULL, 0x0080002000000400ULL, 0x0000000000000000ULL, 0x0080002000000402ULL, 0x0000000000000000ULL,
		0x0080002000080000ULL, 0x0000000000000000ULL, 0x0080002000080002ULL, 0x0000000000000000ULL, 0x0080002000080400ULL, 0x0000000000000000ULL, 0x0080002000080402ULL, 0x0000000000000000ULL,
		0x0080002010000000ULL, 0x0000000000000000ULL, 0x0080002010000002ULL, 0x0000000000000000ULL, 0x0080002010000400ULL, 0x0000000000000000ULL, 0x0080002010000402ULL, 0x0000000000000000ULL,
		0x0080002010080000ULL, 0x0000000000000000ULL, 0x0080002010080002ULL, 0x0000000000000000ULL, 0x0080002010080400ULL, 0x0000000000000000ULL, 0x0080002010080402ULL, 0x0000000000000000ULL,
		0x0080400000000000ULL, 0x0000000000000000ULL, 0x0080400000000002ULL, 0x0000000000000000ULL, 0x0080400000000400ULL, 0x0000000000000000ULL, 0x0080400000000402ULL, 0x0000000000000000ULL,
		0x0080400000080000ULL, 0x0000000000000000ULL, 0x0080400000080002ULL, 0x0000000000000000ULL, 0x0080400000080400ULL, 0x0000000000000000ULL, 0x0080400000080402ULL, 0x0000000000000000ULL,
		0x0080400010000000ULL, 0x0000000000000000ULL, 0x0080400010000002ULL, 0x0000000000000000ULL, 0x0080400010000400ULL, 0x0000000000000000ULL, 0x0080400010000402ULL, 0x0000000000000000ULL,
		0x0080400010080000ULL, 0x0000000000000000ULL, 0x0080400010080002ULL, 0x0000000000000000ULL, 0x0080400010080400ULL, 0x0000000000000000ULL, 0x0080400010080402ULL, 0x0000000000000000ULL,
		0x0080402000000000ULL, 0x0000000000000000ULL, 0x0080402000000002ULL, 0x0000000000000000ULL, 0x0080402000000400ULL, 0x0000000000000000ULL, 0x0080402000000402ULL, 0x0000000000000000ULL,
		0x0080402000080000ULL, 0x0000000000000000ULL, 0x0080402000080002ULL, 0x0000000000000000ULL, 0x0080402000080400ULL, 0x0000000000000000ULL, 0x0080402000080402ULL, 0x0000000000000000ULL,
		0x0080402010000000ULL, 0x0000000000000000ULL, 0x0080402010000002ULL, 0x0000000000000000ULL, 0x0080402010000400ULL, 0x0000000000000000ULL, 0x0080402010000402ULL, 0x0000000000000000ULL,
		0x0080402010080000ULL, 0x0000000000000000ULL, 0x0080402010080002ULL, 0x0000000000000000ULL, 0x0080402010080400ULL, 0x0000000000000000ULL, 0x0080402010080402ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the C1-H6 line */
const unsigned long long C1H6[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000020000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000020000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000020000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000020000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000020100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000020100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000020100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000020100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004000000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004000000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004000000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004000100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004000100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004000100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004000100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004020000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004020000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004020000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004020000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004020100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004020100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000004020100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000004020100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800000000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800000000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800000000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800000100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800000100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800000100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800000100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800020000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800020000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800020000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800020000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800020100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800020100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000800020100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000800020100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804000000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804000000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804000000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804000100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804000100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804000100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804000100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804020000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804020000004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804020000800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804020000804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804020100000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804020100004ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000804020100800ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000804020100804ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the D1-H5 line */
const unsigned long long D1H5[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000001000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000001008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000200000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000200008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000201000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000201008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040000008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040001000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040001008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040200000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040200008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040201000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000040201008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000000008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000001000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000001008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000200000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000200008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000201000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008000201008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040000008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040001000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040001008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040200000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040200008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040201000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000008040201008ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};

/** conversion from an 8-bit line to the E1-H4 line */
const unsigned long long E1H4[256] = {
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000002000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000002010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000400000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000400010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000402000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000402010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080000010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080002000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080002010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080400000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080400010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080402000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000080402010ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
		0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL, 0x0000000000000000ULL,
};


/**
 * Compute flipped discs when playing on square A1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = A1A8[index_v];


	index_h = OUTFLANK[0][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[0][index_h]);

	index_d9 = OUTFLANK[0][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[0][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[1][index_h]);

	index_d9 = OUTFLANK[1][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[1][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[2][index_h]);

	flipped |= ((P >> 7) & 0x0000000000000200ULL & O);

	index_d9 = OUTFLANK[2][((O & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[2][index_d9];
	flipped |= C1H6[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[3][index_h]);

	index_d7 = OUTFLANK[3][((O & 0x0000000001020408ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000001020408ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= D1A4[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= D1H5[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[4][index_h]);

	index_d7 = OUTFLANK[4][((O & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= E1A5[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x0000000080402010ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000080402010ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= E1H4[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[5][index_h]);

	index_d7 = OUTFLANK[5][((O & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[5][index_d7];
	flipped |= F1A6[index_d7];

	flipped |= ((P >> 9) & 0x0000000000004000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square G1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[6][index_h]);

	index_d7 = OUTFLANK[6][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[6][index_d7];
	flipped |= G1A7[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H1.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H1(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[0][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[0][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][O & 0xff] & P;
	flipped |= ((unsigned long long) FLIPPED[7][index_h]);

	index_d7 = OUTFLANK[7][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[7][index_d7];
	flipped |= H1A8[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 8;

	index_d9 = OUTFLANK[0][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[0][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 8;

	index_d9 = OUTFLANK[1][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[1][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 8;

	flipped |= ((P >> 7) & 0x0000000000020000ULL & O);

	index_d9 = OUTFLANK[2][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[2][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 8;

	index_d7 = OUTFLANK[3][((O & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= E1A5[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= C1H6[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 8;

	index_d7 = OUTFLANK[4][((O & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= F1A6[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= D1H5[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 8;

	index_d7 = OUTFLANK[5][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[5][index_d7];
	flipped |= G1A7[index_d7];

	flipped |= ((P >> 9) & 0x0000000000400000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square G2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 8;

	index_d7 = OUTFLANK[6][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[6][index_d7];
	flipped |= H1A8[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H2.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H2(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[1][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[1][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 8) & 0xff] & (P >> 8);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 8;

	index_d7 = OUTFLANK[7][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[7][index_d7];
	flipped |= H2B8[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 16;

	flipped |= ((P << 7) & 0x0000000000000200ULL & O);

	index_d9 = OUTFLANK[0][((O & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[0][index_d9];
	flipped |= A3F8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 16;

	flipped |= ((P << 7) & 0x0000000000000400ULL & O);

	index_d9 = OUTFLANK[1][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[1][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 16;

	flipped |= ((P >> 7) & 0x0000000002000000ULL & O) | ((P << 7) & 0x0000000000000800ULL & O);

	index_d9 = OUTFLANK[2][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[2][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 16;

	index_d7 = OUTFLANK[3][((O & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= F1A6[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 16;

	index_d7 = OUTFLANK[4][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= G1A7[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= C1H6[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 16;

	index_d7 = OUTFLANK[5][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[5][index_d7];
	flipped |= H1A8[index_d7];

	flipped |= ((P >> 9) & 0x0000000040000000ULL & O) | ((P << 9) & 0x0000000000001000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square G3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 16;

	index_d7 = OUTFLANK[6][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[6][index_d7];
	flipped |= H2B8[index_d7];

	flipped |= ((P << 9) & 0x0000000000002000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square H3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H3(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[2][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[2][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 16) & 0xff] & (P >> 16);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 16;

	index_d7 = OUTFLANK[7][((O & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[7][index_d7];
	flipped |= H3C8[index_d7];

	flipped |= ((P << 9) & 0x0000000000004000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square A4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 24;

	index_d7 = OUTFLANK[0][((O & 0x0000000001020408ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000001020408ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[0][index_d7];
	flipped |= D1A4[index_d7];

	index_d9 = OUTFLANK[0][((O & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[0][index_d9];
	flipped |= A4E8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 24;

	index_d7 = OUTFLANK[1][((O & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[1][index_d7];
	flipped |= E1A5[index_d7];

	index_d9 = OUTFLANK[1][((O & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[1][index_d9];
	flipped |= A3F8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 24;

	index_d7 = OUTFLANK[2][((O & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[2][index_d7];
	flipped |= F1A6[index_d7];

	index_d9 = OUTFLANK[2][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[2][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 24;

	index_d7 = OUTFLANK[3][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= G1A7[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E3.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 24;

	index_d7 = OUTFLANK[4][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= H1A8[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 24;

	index_d7 = OUTFLANK[5][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[5][index_d7];
	flipped |= H2B8[index_d7];

	index_d9 = OUTFLANK[5][((O & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[5][index_d9];
	flipped |= C1H6[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 24;

	index_d7 = OUTFLANK[6][((O & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[6][index_d7];
	flipped |= H3C8[index_d7];

	index_d9 = OUTFLANK[6][((O & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[6][index_d9];
	flipped |= D1H5[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H4.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H4(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[3][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[3][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 24) & 0xff] & (P >> 24);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 24;

	index_d7 = OUTFLANK[7][((O & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[7][index_d7];
	flipped |= H4D8[index_d7];

	index_d9 = OUTFLANK[7][((O & 0x0000000080402010ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000080402010ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[7][index_d9];
	flipped |= E1H4[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 32;

	index_d7 = OUTFLANK[0][((O & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000000102040810ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[0][index_d7];
	flipped |= E1A5[index_d7];

	index_d9 = OUTFLANK[0][((O & 0x0804020100000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0804020100000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[0][index_d9];
	flipped |= A5D8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 32;

	index_d7 = OUTFLANK[1][((O & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[1][index_d7];
	flipped |= F1A6[index_d7];

	index_d9 = OUTFLANK[1][((O & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[1][index_d9];
	flipped |= A4E8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 32;

	index_d7 = OUTFLANK[2][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[2][index_d7];
	flipped |= G1A7[index_d7];

	index_d9 = OUTFLANK[2][((O & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[2][index_d9];
	flipped |= A3F8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square D5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 32;

	index_d7 = OUTFLANK[3][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= H1A8[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 32;

	index_d7 = OUTFLANK[4][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= H2B8[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 32;

	index_d7 = OUTFLANK[5][((O & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[5][index_d7];
	flipped |= H3C8[index_d7];

	index_d9 = OUTFLANK[5][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[5][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 32;

	index_d7 = OUTFLANK[6][((O & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[6][index_d7];
	flipped |= H4D8[index_d7];

	index_d9 = OUTFLANK[6][((O & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[6][index_d9];
	flipped |= C1H6[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H5.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H5(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[4][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[4][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 32) & 0xff] & (P >> 32);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 32;

	index_d7 = OUTFLANK[7][((O & 0x1020408000000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x1020408000000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[7][index_d7];
	flipped |= H5E8[index_d7];

	index_d9 = OUTFLANK[7][((O & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000008040201008ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[7][index_d9];
	flipped |= D1H5[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 40;

	index_d7 = OUTFLANK[0][((O & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000010204081020ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[0][index_d7];
	flipped |= F1A6[index_d7];

	flipped |= ((P >> 9) & 0x0002000000000000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square B6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 40;

	index_d7 = OUTFLANK[1][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[1][index_d7];
	flipped |= G1A7[index_d7];

	flipped |= ((P >> 9) & 0x0004000000000000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square C6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 40;

	index_d7 = OUTFLANK[2][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[2][index_d7];
	flipped |= H1A8[index_d7];

	flipped |= ((P >> 9) & 0x0008000000000000ULL & O) | ((P << 9) & 0x0000000200000000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square D6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 40;

	index_d7 = OUTFLANK[3][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= H2B8[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= A3F8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 40;

	index_d7 = OUTFLANK[4][((O & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= H3C8[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 40;

	flipped |= ((P >> 7) & 0x0010000000000000ULL & O) | ((P << 7) & 0x0000004000000000ULL & O);

	index_d9 = OUTFLANK[5][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[5][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 40;

	flipped |= ((P >> 7) & 0x0020000000000000ULL & O);

	index_d9 = OUTFLANK[6][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[6][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H6.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H6(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[5][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[5][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 40) & 0xff] & (P >> 40);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 40;

	flipped |= ((P >> 7) & 0x0040000000000000ULL & O);

	index_d9 = OUTFLANK[7][((O & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0000804020100804ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[7][index_d9];
	flipped |= C1H6[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 48;

	index_d7 = OUTFLANK[0][((O & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0001020408102040ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[0][index_d7];
	flipped |= G1A7[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 48;

	index_d7 = OUTFLANK[1][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[1][index_d7];
	flipped |= H1A8[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 48;

	index_d7 = OUTFLANK[2][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[2][index_d7];
	flipped |= H2B8[index_d7];

	flipped |= ((P << 9) & 0x0000020000000000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square D7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 48;

	index_d7 = OUTFLANK[3][((O & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= H3C8[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= A4E8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 48;

	index_d7 = OUTFLANK[4][((O & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= H4D8[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= A3F8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 48;

	flipped |= ((P << 7) & 0x0000400000000000ULL & O);

	index_d9 = OUTFLANK[5][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[5][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 48;

	index_d9 = OUTFLANK[6][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[6][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H7.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H7(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[6][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[6][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 48) & 0xff] & (P >> 48);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 48;

	index_d9 = OUTFLANK[7][((O & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0080402010080402ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[7][index_d9];
	flipped |= B1H7[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square A8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_A8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56] & (((P & 0x0101010101010101ULL) * 0x0102040810204080ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = A1A8[index_v];

	index_h = OUTFLANK[0][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[0][index_h]) << 56;

	index_d7 = OUTFLANK[0][((O & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0102040810204080ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[0][index_d7];
	flipped |= H1A8[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square B8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_B8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56] & (((P & 0x0202020202020202ULL) * 0x0081020408102040ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = B1B8[index_v];

	index_h = OUTFLANK[1][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[1][index_h]) << 56;

	index_d7 = OUTFLANK[1][((O & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0204081020408000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[1][index_d7];
	flipped |= H2B8[index_d7];


	return flipped;
}

/**
 * Compute flipped discs when playing on square C8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_C8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56] & (((P & 0x0404040404040404ULL) * 0x0040810204081020ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = C1C8[index_v];

	index_h = OUTFLANK[2][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[2][index_h]) << 56;

	index_d7 = OUTFLANK[2][((O & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0408102040800000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[2][index_d7];
	flipped |= H3C8[index_d7];

	flipped |= ((P << 9) & 0x0002000000000000ULL & O);


	return flipped;
}

/**
 * Compute flipped discs when playing on square D8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_D8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56] & (((P & 0x0808080808080808ULL) * 0x0020408102040810ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = D1D8[index_v];

	index_h = OUTFLANK[3][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[3][index_h]) << 56;

	index_d7 = OUTFLANK[3][((O & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0810204080000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[3][index_d7];
	flipped |= H4D8[index_d7];

	index_d9 = OUTFLANK[3][((O & 0x0804020100000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x0804020100000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[3][index_d9];
	flipped |= A5D8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square E8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_E8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d7, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56] & (((P & 0x1010101010101010ULL) * 0x0010204081020408ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = E1E8[index_v];

	index_h = OUTFLANK[4][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[4][index_h]) << 56;

	index_d7 = OUTFLANK[4][((O & 0x1020408000000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x1020408000000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d7 = FLIPPED[4][index_d7];
	flipped |= H5E8[index_d7];

	index_d9 = OUTFLANK[4][((O & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x1008040201000000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[4][index_d9];
	flipped |= A4E8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square F8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_F8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56] & (((P & 0x2020202020202020ULL) * 0x0008102040810204ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = F1F8[index_v];

	index_h = OUTFLANK[5][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[5][index_h]) << 56;

	flipped |= ((P << 7) & 0x0040000000000000ULL & O);

	index_d9 = OUTFLANK[5][((O & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x2010080402010000ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[5][index_d9];
	flipped |= A3F8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square G8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_G8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56] & (((P & 0x4040404040404040ULL) * 0x0004081020408102ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = G1G8[index_v];

	index_h = OUTFLANK[6][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[6][index_h]) << 56;

	index_d9 = OUTFLANK[6][((O & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x4020100804020100ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[6][index_d9];
	flipped |= A2G8[index_d9];


	return flipped;
}

/**
 * Compute flipped discs when playing on square H8.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_H8(const unsigned long long P, const unsigned long long O)
{
	register int index_h, index_v, index_d9;
	register unsigned long long flipped;

	index_v = OUTFLANK[7][((O & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56] & (((P & 0x8080808080808080ULL) * 0x0002040810204081ULL) >> 56);
	index_v = FLIPPED[7][index_v];
	flipped = H1H8[index_v];

	index_h = OUTFLANK[7][(O >> 56) & 0xff] & (P >> 56);
	flipped |= ((unsigned long long) FLIPPED[7][index_h]) << 56;

	index_d9 = OUTFLANK[7][((O & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56] & (((P & 0x8040201008040201ULL) * 0x0101010101010101ULL) >> 56);
	index_d9 = FLIPPED[7][index_d9];
	flipped |= A1H8[index_d9];


	return flipped;
}

/**
 * Compute (zero-) flipped discs when plassing.
 *
 * @param P player's disc pattern.
 * @param O opponent's disc pattern.
 * @return flipped disc pattern.
 */
static unsigned long long flip_pass(const unsigned long long P, const unsigned long long O)
{
	(void) P; // useless code to shut-up compiler warning
	(void) O;
	return 0;
}


/** Array of functions to compute flipped discs */
unsigned long long (*flip[])(const unsigned long long, const unsigned long long) = {
	flip_A1, flip_B1, flip_C1, flip_D1,
	flip_E1, flip_F1, flip_G1, flip_H1,
	flip_A2, flip_B2, flip_C2, flip_D2,
	flip_E2, flip_F2, flip_G2, flip_H2,
	flip_A3, flip_B3, flip_C3, flip_D3,
	flip_E3, flip_F3, flip_G3, flip_H3,
	flip_A4, flip_B4, flip_C4, flip_D4,
	flip_E4, flip_F4, flip_G4, flip_H4,
	flip_A5, flip_B5, flip_C5, flip_D5,
	flip_E5, flip_F5, flip_G5, flip_H5,
	flip_A6, flip_B6, flip_C6, flip_D6,
	flip_E6, flip_F6, flip_G6, flip_H6,
	flip_A7, flip_B7, flip_C7, flip_D7,
	flip_E7, flip_F7, flip_G7, flip_H7,
	flip_A8, flip_B8, flip_C8, flip_D8,
	flip_E8, flip_F8, flip_G8, flip_H8,
	flip_pass, flip_pass
};

